Commit 97157cce authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Use proc instead of enum in FTPREMOVEDIRECTORYW request.

parent ee99b3f0
......@@ -1519,6 +1519,17 @@ BOOL WINAPI FtpRemoveDirectoryA(HINTERNET hFtpSession, LPCSTR lpszDirectory)
* FALSE on failure
*
*/
static void AsyncFtpRemoveDirectoryProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPREMOVEDIRECTORYW const *req = &workRequest->u.FtpRemoveDirectoryW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpRemoveDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs;
......@@ -1538,7 +1549,8 @@ BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPREMOVEDIRECTORYW *req;
workRequest.asyncall = FTPREMOVEDIRECTORYW;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpRemoveDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpRemoveDirectoryW;
req->lpszDirectory = WININET_strdupW(lpszDirectory);
......
......@@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPREMOVEDIRECTORYW:
{
struct WORKREQ_FTPREMOVEDIRECTORYW *req;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPREMOVEDIRECTORYW %p\n", lpwfs);
req = &workRequest.u.FtpRemoveDirectoryW;
FTP_FtpRemoveDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
break;
case FTPRENAMEFILEW:
{
struct WORKREQ_FTPRENAMEFILEW *req = &workRequest.u.FtpRenameFileW;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
FTPFINDNEXTW,
} ASYNC_FUNC;
......
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