wininet: Use proc instead of enum in FTPUTFILE request.
This commit is contained in:
parent
662c885a0b
commit
4adce67cf6
|
@ -180,6 +180,20 @@ BOOL WINAPI FtpPutFileA(HINTERNET hConnect, LPCSTR lpszLocalFile,
|
|||
* FALSE on failure
|
||||
*
|
||||
*/
|
||||
static void AsyncFtpPutFileProc(WORKREQUEST *workRequest)
|
||||
{
|
||||
struct WORKREQ_FTPPUTFILEW const *req = &workRequest->u.FtpPutFileW;
|
||||
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
|
||||
|
||||
TRACE("%p\n", lpwfs);
|
||||
|
||||
FTP_FtpPutFileW(lpwfs, req->lpszLocalFile,
|
||||
req->lpszNewRemoteFile, req->dwFlags, req->dwContext);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszLocalFile);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszNewRemoteFile);
|
||||
}
|
||||
|
||||
BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
|
||||
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext)
|
||||
{
|
||||
|
@ -200,8 +214,9 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
|
|||
WORKREQUEST workRequest;
|
||||
struct WORKREQ_FTPPUTFILEW *req = &workRequest.u.FtpPutFileW;
|
||||
|
||||
workRequest.asyncall = FTPPUTFILEW;
|
||||
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
|
||||
workRequest.asyncall = CALLASYNCPROC;
|
||||
workRequest.asyncproc = AsyncFtpPutFileProc;
|
||||
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
|
||||
req->lpszLocalFile = WININET_strdupW(lpszLocalFile);
|
||||
req->lpszNewRemoteFile = WININET_strdupW(lpszNewRemoteFile);
|
||||
req->dwFlags = dwFlags;
|
||||
|
|
|
@ -3243,21 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
|
|||
workRequest.asyncproc(&workRequest);
|
||||
break;
|
||||
|
||||
case FTPPUTFILEW:
|
||||
{
|
||||
struct WORKREQ_FTPPUTFILEW *req = &workRequest.u.FtpPutFileW;
|
||||
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
|
||||
|
||||
TRACE("FTPPUTFILEW %p\n", lpwfs);
|
||||
|
||||
FTP_FtpPutFileW(lpwfs, req->lpszLocalFile,
|
||||
req->lpszNewRemoteFile, req->dwFlags, req->dwContext);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszLocalFile);
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszNewRemoteFile);
|
||||
}
|
||||
break;
|
||||
|
||||
case FTPSETCURRENTDIRECTORYW:
|
||||
{
|
||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW *req;
|
||||
|
|
|
@ -250,7 +250,6 @@ typedef struct
|
|||
typedef enum
|
||||
{
|
||||
CALLASYNCPROC,
|
||||
FTPPUTFILEW,
|
||||
FTPSETCURRENTDIRECTORYW,
|
||||
FTPCREATEDIRECTORYW,
|
||||
FTPFINDFIRSTFILEW,
|
||||
|
|
Loading…
Reference in New Issue