wininet: Moved WORKREQ_FTPSETCURRENTDIRECTORYW out of WORKREQUEST.
This commit is contained in:
parent
47d0f5a167
commit
989bb5b983
@ -441,16 +441,20 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
task_header_t hdr;
|
||||||
|
WCHAR *directory;
|
||||||
|
} directory_task_t;
|
||||||
|
|
||||||
static void AsyncFtpSetCurrentDirectoryProc(WORKREQUEST *workRequest)
|
static void AsyncFtpSetCurrentDirectoryProc(task_header_t *hdr)
|
||||||
{
|
{
|
||||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW const *req = &workRequest->u.FtpSetCurrentDirectoryW;
|
directory_task_t *task = (directory_task_t*)hdr;
|
||||||
ftp_session_t *lpwfs = (ftp_session_t*) workRequest->hdr;
|
ftp_session_t *session = (ftp_session_t*)task->hdr.hdr;
|
||||||
|
|
||||||
TRACE("%p\n", lpwfs);
|
TRACE("%p\n", session);
|
||||||
|
|
||||||
FTP_FtpSetCurrentDirectoryW(lpwfs, req->lpszDirectory);
|
FTP_FtpSetCurrentDirectoryW(session, task->directory);
|
||||||
heap_free(req->lpszDirectory);
|
heap_free(task->directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
@ -493,14 +497,12 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
|
|||||||
hIC = lpwfs->lpAppInfo;
|
hIC = lpwfs->lpAppInfo;
|
||||||
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
|
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
|
||||||
{
|
{
|
||||||
WORKREQUEST *task;
|
directory_task_t *task;
|
||||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW *req;
|
|
||||||
|
|
||||||
task = alloc_async_task(&lpwfs->hdr, AsyncFtpSetCurrentDirectoryProc, sizeof(*task));
|
task = alloc_async_task(&lpwfs->hdr, AsyncFtpSetCurrentDirectoryProc, sizeof(*task));
|
||||||
req = &task->u.FtpSetCurrentDirectoryW;
|
task->directory = heap_strdupW(lpszDirectory);
|
||||||
req->lpszDirectory = heap_strdupW(lpszDirectory);
|
|
||||||
|
|
||||||
r = res_to_le(INTERNET_AsyncCall(task));
|
r = res_to_le(INTERNET_AsyncCall(&task->hdr));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -355,11 +355,6 @@ typedef struct
|
|||||||
} http_request_t;
|
} http_request_t;
|
||||||
|
|
||||||
|
|
||||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW
|
|
||||||
{
|
|
||||||
LPWSTR lpszDirectory;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct WORKREQ_FTPCREATEDIRECTORYW
|
struct WORKREQ_FTPCREATEDIRECTORYW
|
||||||
{
|
{
|
||||||
LPWSTR lpszDirectory;
|
LPWSTR lpszDirectory;
|
||||||
@ -427,7 +422,6 @@ typedef struct WORKREQ
|
|||||||
object_header_t *hdr;
|
object_header_t *hdr;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW FtpSetCurrentDirectoryW;
|
|
||||||
struct WORKREQ_FTPCREATEDIRECTORYW FtpCreateDirectoryW;
|
struct WORKREQ_FTPCREATEDIRECTORYW FtpCreateDirectoryW;
|
||||||
struct WORKREQ_FTPFINDFIRSTFILEW FtpFindFirstFileW;
|
struct WORKREQ_FTPFINDFIRSTFILEW FtpFindFirstFileW;
|
||||||
struct WORKREQ_FTPGETCURRENTDIRECTORYW FtpGetCurrentDirectoryW;
|
struct WORKREQ_FTPGETCURRENTDIRECTORYW FtpGetCurrentDirectoryW;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user