Commit de2666fd authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Change all SendAsyncCallback calls into the synchronous

INTERNET_SendCallback where INTERNET_FLAG_ASYNC is already handled properly.
parent a5cb9c55
...@@ -1107,7 +1107,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, ...@@ -1107,7 +1107,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
HeapFree(GetProcessHeap(), 0, lpszUrl); HeapFree(GetProcessHeap(), 0, lpszUrl);
SendAsyncCallback(&lpwhs->hdr, dwContext, INTERNET_SendCallback(&lpwhs->hdr, dwContext,
INTERNET_STATUS_HANDLE_CREATED, &handle, INTERNET_STATUS_HANDLE_CREATED, &handle,
sizeof(handle)); sizeof(handle));
...@@ -1118,7 +1118,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, ...@@ -1118,7 +1118,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
/* /*
* According to my tests. The name is not resolved until a request is Opened * According to my tests. The name is not resolved until a request is Opened
*/ */
SendAsyncCallback(&lpwhr->hdr, dwContext, INTERNET_SendCallback(&lpwhr->hdr, dwContext,
INTERNET_STATUS_RESOLVING_NAME, INTERNET_STATUS_RESOLVING_NAME,
lpwhs->lpszServerName, lpwhs->lpszServerName,
strlenW(lpwhs->lpszServerName)+1); strlenW(lpwhs->lpszServerName)+1);
...@@ -1132,7 +1132,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, ...@@ -1132,7 +1132,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
goto lend; goto lend;
} }
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_NAME_RESOLVED, INTERNET_STATUS_NAME_RESOLVED,
&(lpwhs->socketAddress), &(lpwhs->socketAddress),
sizeof(struct sockaddr_in)); sizeof(struct sockaddr_in));
...@@ -1878,7 +1878,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST ...@@ -1878,7 +1878,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
lpwhs->lpszUserName = WININET_strdupW(userName); lpwhs->lpszUserName = WININET_strdupW(userName);
lpwhs->nServerPort = urlComponents.nPort; lpwhs->nServerPort = urlComponents.nPort;
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RESOLVING_NAME, INTERNET_STATUS_RESOLVING_NAME,
lpwhs->lpszServerName, lpwhs->lpszServerName,
strlenW(lpwhs->lpszServerName)+1); strlenW(lpwhs->lpszServerName)+1);
...@@ -1892,7 +1892,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST ...@@ -1892,7 +1892,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
StrCatW(path,extra); StrCatW(path,extra);
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_NAME_RESOLVED, INTERNET_STATUS_NAME_RESOLVED,
&(lpwhs->socketAddress), &(lpwhs->socketAddress),
sizeof(struct sockaddr_in)); sizeof(struct sockaddr_in));
...@@ -2068,17 +2068,17 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -2068,17 +2068,17 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
ascii_req[len] = 0; ascii_req[len] = 0;
TRACE("full request -> %s\n", debugstr_a(ascii_req) ); TRACE("full request -> %s\n", debugstr_a(ascii_req) );
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_SENDING_REQUEST, NULL, 0); INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
NETCON_send(&lpwhr->netConnection, ascii_req, len, 0, &cnt); NETCON_send(&lpwhr->netConnection, ascii_req, len, 0, &cnt);
HeapFree( GetProcessHeap(), 0, ascii_req ); HeapFree( GetProcessHeap(), 0, ascii_req );
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_REQUEST_SENT, INTERNET_STATUS_REQUEST_SENT,
&len,sizeof(DWORD)); &len, sizeof(DWORD));
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0);
if (cnt < 0) if (cnt < 0)
...@@ -2088,7 +2088,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -2088,7 +2088,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
if (responseLen) if (responseLen)
bSuccess = TRUE; bSuccess = TRUE;
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RESPONSE_RECEIVED, &responseLen, INTERNET_STATUS_RESPONSE_RECEIVED, &responseLen,
sizeof(DWORD)); sizeof(DWORD));
...@@ -2114,7 +2114,7 @@ lend: ...@@ -2114,7 +2114,7 @@ lend:
dwIndex=0; dwIndex=0;
if(HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,&dwIndex)) if(HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,&dwIndex))
{ {
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_REDIRECT, szNewLocation, INTERNET_STATUS_REDIRECT, szNewLocation,
dwBufferSize); dwBufferSize);
return HTTP_HandleRedirect(lpwhr, szNewLocation, lpszHeaders, return HTTP_HandleRedirect(lpwhr, szNewLocation, lpszHeaders,
...@@ -2127,7 +2127,7 @@ lend: ...@@ -2127,7 +2127,7 @@ lend:
iar.dwResult = (DWORD)bSuccess; iar.dwResult = (DWORD)bSuccess;
iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_REQUEST_COMPLETE, &iar, INTERNET_STATUS_REQUEST_COMPLETE, &iar,
sizeof(INTERNET_ASYNC_RESULT)); sizeof(INTERNET_ASYNC_RESULT));
...@@ -2208,7 +2208,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, ...@@ -2208,7 +2208,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
/* Don't send a handle created callback if this handle was created with InternetOpenUrl */ /* Don't send a handle created callback if this handle was created with InternetOpenUrl */
if (!(lpwhs->hdr.dwInternalFlags & INET_OPENURL)) if (!(lpwhs->hdr.dwInternalFlags & INET_OPENURL))
{ {
SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_SendCallback(&hIC->hdr, dwContext,
INTERNET_STATUS_HANDLE_CREATED, &handle, INTERNET_STATUS_HANDLE_CREATED, &handle,
sizeof(handle)); sizeof(handle));
} }
...@@ -2257,7 +2257,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) ...@@ -2257,7 +2257,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent; lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent; hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_CONNECTING_TO_SERVER, INTERNET_STATUS_CONNECTING_TO_SERVER,
&(lpwhs->socketAddress), &(lpwhs->socketAddress),
sizeof(struct sockaddr_in)); sizeof(struct sockaddr_in));
...@@ -2294,7 +2294,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) ...@@ -2294,7 +2294,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
} }
} }
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_CONNECTED_TO_SERVER, INTERNET_STATUS_CONNECTED_TO_SERVER,
&(lpwhs->socketAddress), &(lpwhs->socketAddress),
sizeof(struct sockaddr_in)); sizeof(struct sockaddr_in));
...@@ -2885,7 +2885,7 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr) ...@@ -2885,7 +2885,7 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr)
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent; lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent; hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0); INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
if (NETCON_connected(&lpwhr->netConnection)) if (NETCON_connected(&lpwhr->netConnection))
...@@ -2893,7 +2893,7 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr) ...@@ -2893,7 +2893,7 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr)
NETCON_close(&lpwhr->netConnection); NETCON_close(&lpwhr->netConnection);
} }
SendAsyncCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_CONNECTION_CLOSED, 0, 0); INTERNET_STATUS_CONNECTION_CLOSED, 0, 0);
} }
......
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