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)
TRACE("\n");
WININET_Release(&lpwfn->lpFtpSession->hdr);
for (i = 0; i < lpwfn->size; i++)
{
HeapFree(GetProcessHeap(), 0, lpwfn->lpafp[i].lpszName);
......@@ -2858,6 +2860,9 @@ static HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONW lpwfs, INT nSocket, LP
lpwfn->size = dwSize;
lpwfn->lpafp = lpafp;
WININET_AddRef( &lpwfs->hdr );
lpwfn->lpFtpSession = lpwfs;
handle = WININET_AllocHandle( &lpwfn->hdr );
}
}
......
......@@ -74,10 +74,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
#define MAX_WORKER_THREADS 10
#define RESPONSE_TIMEOUT 30
#define GET_HWININET_FROM_LPWININETFINDNEXT(lpwh) \
(((LPWININETFTPSESSIONW)(lpwh->hdr.lpwhparent))->lpAppInfo)
typedef struct
{
DWORD dwError;
......@@ -955,7 +951,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData)
goto lend;
}
hIC = GET_HWININET_FROM_LPWININETFINDNEXT(lpwh);
hIC = lpwh->lpFtpSession->lpAppInfo;
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{
WORKREQUEST workRequest;
......
......@@ -238,6 +238,7 @@ typedef struct
typedef struct
{
WININETHANDLEHEADER hdr;
WININETFTPSESSIONW *lpFtpSession;
DWORD index;
DWORD size;
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