Commit 51ba2927 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Store WININETFTPSESSIONW pointer in WININETFTPFINDNEXTW.

parent 91312d7d
...@@ -2780,6 +2780,8 @@ static void FTP_CloseFindNextHandle(LPWININETHANDLEHEADER hdr) ...@@ -2780,6 +2780,8 @@ static void FTP_CloseFindNextHandle(LPWININETHANDLEHEADER hdr)
TRACE("\n"); TRACE("\n");
WININET_Release(&lpwfn->lpFtpSession->hdr);
for (i = 0; i < lpwfn->size; i++) for (i = 0; i < lpwfn->size; i++)
{ {
HeapFree(GetProcessHeap(), 0, lpwfn->lpafp[i].lpszName); HeapFree(GetProcessHeap(), 0, lpwfn->lpafp[i].lpszName);
...@@ -2858,6 +2860,9 @@ static HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONW lpwfs, INT nSocket, LP ...@@ -2858,6 +2860,9 @@ static HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONW lpwfs, INT nSocket, LP
lpwfn->size = dwSize; lpwfn->size = dwSize;
lpwfn->lpafp = lpafp; lpwfn->lpafp = lpafp;
WININET_AddRef( &lpwfs->hdr );
lpwfn->lpFtpSession = lpwfs;
handle = WININET_AllocHandle( &lpwfn->hdr ); handle = WININET_AllocHandle( &lpwfn->hdr );
} }
} }
......
...@@ -74,10 +74,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet); ...@@ -74,10 +74,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
#define MAX_WORKER_THREADS 10 #define MAX_WORKER_THREADS 10
#define RESPONSE_TIMEOUT 30 #define RESPONSE_TIMEOUT 30
#define GET_HWININET_FROM_LPWININETFINDNEXT(lpwh) \
(((LPWININETFTPSESSIONW)(lpwh->hdr.lpwhparent))->lpAppInfo)
typedef struct typedef struct
{ {
DWORD dwError; DWORD dwError;
...@@ -955,7 +951,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData) ...@@ -955,7 +951,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData)
goto lend; goto lend;
} }
hIC = GET_HWININET_FROM_LPWININETFINDNEXT(lpwh); hIC = lpwh->lpFtpSession->lpAppInfo;
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC) if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{ {
WORKREQUEST workRequest; WORKREQUEST workRequest;
......
...@@ -238,6 +238,7 @@ typedef struct ...@@ -238,6 +238,7 @@ typedef struct
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
WININETFTPSESSIONW *lpFtpSession;
DWORD index; DWORD index;
DWORD size; DWORD size;
LPFILEPROPERTIESW lpafp; LPFILEPROPERTIESW lpafp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment