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)
* 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)
{
LPWININETFTPSESSIONW lpwfs;
......@@ -1407,7 +1418,8 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
WORKREQUEST workRequest;
struct WORKREQ_FTPDELETEFILEW *req;
workRequest.asyncall = FTPDELETEFILEW;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpDeleteFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpDeleteFileW;
req->lpszFilename = WININET_strdupW(lpszFileName);
......
......@@ -3243,18 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
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:
{
struct WORKREQ_FTPREMOVEDIRECTORYW *req;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
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