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

wininet: Use proc instead of enum in FTPOPENFILEW request.

parent 3b77ff24
......@@ -1003,6 +1003,18 @@ HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
* NULL on failure
*
*/
static void AsyncFtpOpenFileProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPOPENFILEW const *req = &workRequest->u.FtpOpenFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpOpenFileW(lpwfs, req->lpszFilename,
req->dwAccess, req->dwFlags, req->dwContext);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
LPCWSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext)
......@@ -1031,8 +1043,9 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
WORKREQUEST workRequest;
struct WORKREQ_FTPOPENFILEW *req;
workRequest.asyncall = FTPOPENFILEW;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpOpenFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpOpenFileW;
req->lpszFilename = WININET_strdupW(lpszFileName);
req->dwAccess = fdwAccess;
......
......@@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPOPENFILEW:
{
struct WORKREQ_FTPOPENFILEW *req = &workRequest.u.FtpOpenFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPOPENFILEW %p\n", lpwfs);
FTP_FtpOpenFileW(lpwfs, req->lpszFilename,
req->dwAccess, req->dwFlags, req->dwContext);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
break;
case FTPGETFILEW:
{
struct WORKREQ_FTPGETFILEW *req = &workRequest.u.FtpGetFileW;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPOPENFILEW,
FTPGETFILEW,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,
......
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