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)
* 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 )
{
/* if the verb is NULL default to GET */
......@@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = HTTPSENDREQUESTW;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW;
if (lpBuffersIn)
......@@ -1873,8 +1888,9 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = HTTPSENDREQUESTW;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW;
if (lpszHeaders)
req->lpszHeader = WININET_strdupW(lpszHeaders);
......@@ -2351,7 +2367,6 @@ lend:
return bSuccess;
}
/***********************************************************************
* HTTP_Connect (internal)
*
......
......@@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void)
}
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:
{
struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
......
......@@ -261,7 +261,6 @@ typedef enum
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
FTPFINDNEXTW,
HTTPSENDREQUESTW,
HTTPOPENREQUESTW,
INTERNETOPENURLW,
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