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

wininet: Use proc instead of enum in FTPSETCURRENTDIRECTORY request.

parent 4adce67c
......@@ -352,6 +352,17 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
* FALSE on failure
*
*/
static void AsyncFtpSetCurrentDirectoryProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPSETCURRENTDIRECTORYW const *req = &workRequest->u.FtpSetCurrentDirectoryW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpSetCurrentDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs = NULL;
......@@ -379,7 +390,8 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPSETCURRENTDIRECTORYW *req;
workRequest.asyncall = FTPSETCURRENTDIRECTORYW;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpSetCurrentDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpSetCurrentDirectoryW;
req->lpszDirectory = WININET_strdupW(lpszDirectory);
......
......@@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPSETCURRENTDIRECTORYW:
{
struct WORKREQ_FTPSETCURRENTDIRECTORYW *req;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPSETCURRENTDIRECTORYW %p\n", lpwfs);
req = &workRequest.u.FtpSetCurrentDirectoryW;
FTP_FtpSetCurrentDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
break;
case FTPCREATEDIRECTORYW:
{
struct WORKREQ_FTPCREATEDIRECTORYW *req;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPSETCURRENTDIRECTORYW,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
......
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