Commit 3a08f1f6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Use proc instead of enum in FTPRENAMEFILEW request.

parent 97157cce
......@@ -1654,6 +1654,18 @@ BOOL WINAPI FtpRenameFileA(HINTERNET hFtpSession, LPCSTR lpszSrc, LPCSTR lpszDes
* FALSE on failure
*
*/
static void AsyncFtpRenameFileProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPRENAMEFILEW const *req = &workRequest->u.FtpRenameFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpRenameFileW(lpwfs, req->lpszSrcFile, req->lpszDestFile);
HeapFree(GetProcessHeap(), 0, req->lpszSrcFile);
HeapFree(GetProcessHeap(), 0, req->lpszDestFile);
}
BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszDest)
{
LPWININETFTPSESSIONW lpwfs;
......@@ -1673,8 +1685,9 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD
WORKREQUEST workRequest;
struct WORKREQ_FTPRENAMEFILEW *req;
workRequest.asyncall = FTPRENAMEFILEW;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpRenameFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpRenameFileW;
req->lpszSrcFile = WININET_strdupW(lpszSrc);
req->lpszDestFile = WININET_strdupW(lpszDest);
......
......@@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPRENAMEFILEW:
{
struct WORKREQ_FTPRENAMEFILEW *req = &workRequest.u.FtpRenameFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPRENAMEFILEW %p\n", lpwfs);
FTP_FtpRenameFileW(lpwfs, req->lpszSrcFile, req->lpszDestFile);
HeapFree(GetProcessHeap(), 0, req->lpszSrcFile);
HeapFree(GetProcessHeap(), 0, req->lpszDestFile);
}
break;
case FTPFINDNEXTW:
{
struct WORKREQ_FTPFINDNEXTW *req;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
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