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

wininet: Use proc instead of enum in HTTPSENDREQUESTW request.

parent e30037f0
...@@ -180,6 +180,20 @@ static void HTTP_FreeTokens(LPWSTR * token_array) ...@@ -180,6 +180,20 @@ static void HTTP_FreeTokens(LPWSTR * token_array)
* Helper functions for the HttpSendRequest(Ex) functions * Helper functions for the HttpSendRequest(Ex) functions
* *
*/ */
static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest)
{
struct WORKREQ_HTTPSENDREQUESTW const *req = &workRequest->u.HttpSendRequestW;
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest->hdr;
TRACE("%p\n", lpwhr);
HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
req->dwContentLength, req->bEndRequest);
HeapFree(GetProcessHeap(), 0, req->lpszHeader);
}
static void HTTP_FixVerb( LPWININETHTTPREQW lpwhr ) static void HTTP_FixVerb( LPWININETHTTPREQW lpwhr )
{ {
/* if the verb is NULL default to GET */ /* if the verb is NULL default to GET */
...@@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest, ...@@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
WORKREQUEST workRequest; WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req; struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = HTTPSENDREQUESTW; workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW; req = &workRequest.u.HttpSendRequestW;
if (lpBuffersIn) if (lpBuffersIn)
...@@ -1873,7 +1888,8 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, ...@@ -1873,7 +1888,8 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
WORKREQUEST workRequest; WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req; struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = HTTPSENDREQUESTW; workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW; req = &workRequest.u.HttpSendRequestW;
if (lpszHeaders) if (lpszHeaders)
...@@ -2351,7 +2367,6 @@ lend: ...@@ -2351,7 +2367,6 @@ lend:
return bSuccess; return bSuccess;
} }
/*********************************************************************** /***********************************************************************
* HTTP_Connect (internal) * HTTP_Connect (internal)
* *
......
...@@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void) ...@@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void)
} }
break; break;
case HTTPSENDREQUESTW:
{
struct WORKREQ_HTTPSENDREQUESTW *req = &workRequest.u.HttpSendRequestW;
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest.hdr;
TRACE("HTTPSENDREQUESTW %p\n", lpwhr);
HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
req->dwContentLength, req->bEndRequest);
HeapFree(GetProcessHeap(), 0, req->lpszHeader);
}
break;
case HTTPOPENREQUESTW: case HTTPOPENREQUESTW:
{ {
struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW; struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
......
...@@ -261,7 +261,6 @@ typedef enum ...@@ -261,7 +261,6 @@ typedef enum
FTPREMOVEDIRECTORYW, FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW, FTPRENAMEFILEW,
FTPFINDNEXTW, FTPFINDNEXTW,
HTTPSENDREQUESTW,
HTTPOPENREQUESTW, HTTPOPENREQUESTW,
INTERNETOPENURLW, INTERNETOPENURLW,
INTERNETREADFILEEXA, INTERNETREADFILEEXA,
......
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