Commit c4aa47ba authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Use proc instead of enum in FTPCREATEDIRECTORY request.

parent f28b0e3b
......@@ -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);
......
......@@ -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;
......
......@@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
FTPOPENFILEW,
......
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