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

wininet: Use proc instead of enum in FTPDELETEFILEW request.

parent 05410836
...@@ -1388,6 +1388,17 @@ BOOL WINAPI FtpDeleteFileA(HINTERNET hFtpSession, LPCSTR lpszFileName) ...@@ -1388,6 +1388,17 @@ BOOL WINAPI FtpDeleteFileA(HINTERNET hFtpSession, LPCSTR lpszFileName)
* FALSE on failure * FALSE on failure
* *
*/ */
static void AsyncFtpDeleteFileProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPDELETEFILEW const *req = &workRequest->u.FtpDeleteFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpDeleteFileW(lpwfs, req->lpszFilename);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName) BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
{ {
LPWININETFTPSESSIONW lpwfs; LPWININETFTPSESSIONW lpwfs;
...@@ -1407,7 +1418,8 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName) ...@@ -1407,7 +1418,8 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
WORKREQUEST workRequest; WORKREQUEST workRequest;
struct WORKREQ_FTPDELETEFILEW *req; struct WORKREQ_FTPDELETEFILEW *req;
workRequest.asyncall = FTPDELETEFILEW; workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpDeleteFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr ); workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpDeleteFileW; req = &workRequest.u.FtpDeleteFileW;
req->lpszFilename = WININET_strdupW(lpszFileName); req->lpszFilename = WININET_strdupW(lpszFileName);
......
...@@ -3243,18 +3243,6 @@ static VOID INTERNET_ExecuteWork(void) ...@@ -3243,18 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest); workRequest.asyncproc(&workRequest);
break; break;
case FTPDELETEFILEW:
{
struct WORKREQ_FTPDELETEFILEW *req = &workRequest.u.FtpDeleteFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPDELETEFILEW %p\n", lpwfs);
FTP_FtpDeleteFileW(lpwfs, req->lpszFilename);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
break;
case FTPREMOVEDIRECTORYW: case FTPREMOVEDIRECTORYW:
{ {
struct WORKREQ_FTPREMOVEDIRECTORYW *req; struct WORKREQ_FTPREMOVEDIRECTORYW *req;
......
...@@ -250,7 +250,6 @@ typedef struct ...@@ -250,7 +250,6 @@ typedef struct
typedef enum typedef enum
{ {
CALLASYNCPROC, CALLASYNCPROC,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW, FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW, FTPRENAMEFILEW,
FTPFINDNEXTW, FTPFINDNEXTW,
......
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