wininet: Use proc instead of enum in FTPCREATEDIRECTORY request.

This commit is contained in:
Jacek Caban 2006-12-25 21:35:03 +01:00 committed by Alexandre Julliard
parent f28b0e3b10
commit c4aa47badd
3 changed files with 14 additions and 16 deletions

View File

@ -499,6 +499,17 @@ BOOL WINAPI FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
* FALSE on failure
*
*/
static void AsyncFtpCreateDirectoryProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPCREATEDIRECTORYW const *req = &workRequest->u.FtpCreateDirectoryW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE(" %p\n", lpwfs);
FTP_FtpCreateDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs;
@ -518,8 +529,9 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPCREATEDIRECTORYW *req;
workRequest.asyncall = FTPCREATEDIRECTORYW;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpCreateDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpCreateDirectoryW;
req->lpszDirectory = WININET_strdupW(lpszDirectory);

View File

@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPCREATEDIRECTORYW:
{
struct WORKREQ_FTPCREATEDIRECTORYW *req;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPCREATEDIRECTORYW %p\n", lpwfs);
req = &workRequest.u.FtpCreateDirectoryW;
FTP_FtpCreateDirectoryW(lpwfs, req->lpszDirectory);
HeapFree(GetProcessHeap(), 0, req->lpszDirectory);
}
break;
case FTPFINDFIRSTFILEW:
{
struct WORKREQ_FTPFINDFIRSTFILEW *req;

View File

@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
FTPOPENFILEW,