wininet: Use proc instead of enum in FTPGETFILEW request.
This commit is contained in:
parent
3c90016f2f
commit
054108368e
|
@ -1198,6 +1198,20 @@ BOOL WINAPI FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszN
|
|||
* FALSE on failure
|
||||
*
|
||||
*/
|
||||
static void AsyncFtpGetFileProc(WORKREQUEST *workRequest)
|
||||
{
|
||||
struct WORKREQ_FTPGETFILEW const *req = &workRequest->u.FtpGetFileW;
|
||||
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
|
||||
|
||||
TRACE("%p\n", lpwfs);
|
||||
|
||||
FTP_FtpGetFileW(lpwfs, req->lpszRemoteFile,
|
||||
req->lpszNewFile, req->fFailIfExists,
|
||||
req->dwLocalFlagsAttribute, req->dwFlags, req->dwContext);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszRemoteFile);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszNewFile);
|
||||
}
|
||||
|
||||
BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
|
||||
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
|
||||
DWORD dwContext)
|
||||
|
@ -1224,8 +1238,9 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps
|
|||
WORKREQUEST workRequest;
|
||||
struct WORKREQ_FTPGETFILEW *req;
|
||||
|
||||
workRequest.asyncall = FTPGETFILEW;
|
||||
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
|
||||
workRequest.asyncall = CALLASYNCPROC;
|
||||
workRequest.asyncproc = AsyncFtpGetFileProc;
|
||||
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
|
||||
req = &workRequest.u.FtpGetFileW;
|
||||
req->lpszRemoteFile = WININET_strdupW(lpszRemoteFile);
|
||||
req->lpszNewFile = WININET_strdupW(lpszNewFile);
|
||||
|
|
|
@ -3243,21 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
|
|||
workRequest.asyncproc(&workRequest);
|
||||
break;
|
||||
|
||||
case FTPGETFILEW:
|
||||
{
|
||||
struct WORKREQ_FTPGETFILEW *req = &workRequest.u.FtpGetFileW;
|
||||
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
|
||||
|
||||
TRACE("FTPGETFILEW %p\n", lpwfs);
|
||||
|
||||
FTP_FtpGetFileW(lpwfs, req->lpszRemoteFile,
|
||||
req->lpszNewFile, req->fFailIfExists,
|
||||
req->dwLocalFlagsAttribute, req->dwFlags, req->dwContext);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszRemoteFile);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszNewFile);
|
||||
}
|
||||
break;
|
||||
|
||||
case FTPDELETEFILEW:
|
||||
{
|
||||
struct WORKREQ_FTPDELETEFILEW *req = &workRequest.u.FtpDeleteFileW;
|
||||
|
|
|
@ -250,7 +250,6 @@ typedef struct
|
|||
typedef enum
|
||||
{
|
||||
CALLASYNCPROC,
|
||||
FTPGETFILEW,
|
||||
FTPDELETEFILEW,
|
||||
FTPREMOVEDIRECTORYW,
|
||||
FTPRENAMEFILEW,
|
||||
|
|
Loading…
Reference in New Issue