Commit a489677f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Moved WORKREQ_FTPFINDNEXTW out of WORKREQUEST.

parent d5c0b17a
......@@ -2138,7 +2138,7 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD
hIC = lpwfs->lpAppInfo;
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{
rename_file_t *task;
rename_file_task_t *task;
task = alloc_async_task(&lpwfs->hdr, AsyncFtpRenameFileProc, sizeof(*task));
task->src_file = heap_strdupW(lpszSrc);
......@@ -3430,11 +3430,16 @@ static DWORD FTPFINDNEXT_FindNextFileProc(WININETFTPFINDNEXTW *find, LPVOID data
return res;
}
static void FTPFINDNEXT_AsyncFindNextFileProc(WORKREQUEST *workRequest)
typedef struct {
task_header_t hdr;
WIN32_FIND_DATAW *find_data;
} find_next_task_t;
static void FTPFINDNEXT_AsyncFindNextFileProc(task_header_t *hdr)
{
struct WORKREQ_FTPFINDNEXTW *req = &workRequest->u.FtpFindNextW;
find_next_task_t *task = (find_next_task_t*)hdr;
FTPFINDNEXT_FindNextFileProc((WININETFTPFINDNEXTW*)workRequest->hdr, req->lpFindFileData);
FTPFINDNEXT_FindNextFileProc((WININETFTPFINDNEXTW*)task->hdr.hdr, task->find_data);
}
static DWORD FTPFINDNEXT_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
......@@ -3460,15 +3465,12 @@ static DWORD FTPFINDNEXT_FindNextFileW(object_header_t *hdr, void *data)
if (find->lpFtpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{
WORKREQUEST *task;
struct WORKREQ_FTPFINDNEXTW *req;
find_next_task_t *task;
task = alloc_async_task(&find->hdr, FTPFINDNEXT_AsyncFindNextFileProc, sizeof(*task));
req = &task->u.FtpFindNextW;
req->lpFindFileData = data;
INTERNET_AsyncCall(task);
task->find_data = data;
INTERNET_AsyncCall(&task->hdr);
return ERROR_SUCCESS;
}
......
......@@ -360,11 +360,6 @@ struct WORKREQ_FTPDELETEFILEW
LPWSTR lpszFilename;
};
struct WORKREQ_FTPFINDNEXTW
{
LPWIN32_FIND_DATAW lpFindFileData;
};
typedef struct WORKREQ task_header_t;
typedef void (*async_task_proc_t)(task_header_t*);
......@@ -375,7 +370,6 @@ typedef struct WORKREQ
union {
struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW;
struct WORKREQ_FTPFINDNEXTW FtpFindNextW;
} u;
} WORKREQUEST, *LPWORKREQUEST;
......
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