Fix 'SendAsyncCallback' when it's really asynchronous.
This commit is contained in:
parent
cc89feb9c4
commit
58b1e2a4e9
|
@ -2733,8 +2733,11 @@ static VOID INTERNET_ExecuteWork(void)
|
||||||
TRACE("SENDCALLBACK %p\n", workRequest.hdr);
|
TRACE("SENDCALLBACK %p\n", workRequest.hdr);
|
||||||
|
|
||||||
SendSyncCallback(workRequest.hdr,
|
SendSyncCallback(workRequest.hdr,
|
||||||
req->dwContext, req->dwInternetStatus, req->lpvStatusInfo,
|
req->dwContext, req->dwInternetStatus, req->lpvStatusInfo,
|
||||||
req->dwStatusInfoLength);
|
req->dwStatusInfoLength);
|
||||||
|
|
||||||
|
/* And frees the copy of the status info */
|
||||||
|
HeapFree(GetProcessHeap(), 0, req->lpvStatusInfo);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -276,13 +276,20 @@ VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
||||||
{
|
{
|
||||||
WORKREQUEST workRequest;
|
WORKREQUEST workRequest;
|
||||||
struct WORKREQ_SENDCALLBACK *req;
|
struct WORKREQ_SENDCALLBACK *req;
|
||||||
|
void *lpvStatusInfo_copy = lpvStatusInfo;
|
||||||
|
|
||||||
|
if (lpvStatusInfo)
|
||||||
|
{
|
||||||
|
lpvStatusInfo_copy = HeapAlloc(GetProcessHeap(), 0, dwStatusInfoLength);
|
||||||
|
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
|
||||||
|
}
|
||||||
|
|
||||||
workRequest.asyncall = SENDCALLBACK;
|
workRequest.asyncall = SENDCALLBACK;
|
||||||
workRequest.hdr = WININET_AddRef( hdr );
|
workRequest.hdr = WININET_AddRef( hdr );
|
||||||
req = &workRequest.u.SendCallback;
|
req = &workRequest.u.SendCallback;
|
||||||
req->dwContext = dwContext;
|
req->dwContext = dwContext;
|
||||||
req->dwInternetStatus = dwInternetStatus;
|
req->dwInternetStatus = dwInternetStatus;
|
||||||
req->lpvStatusInfo = lpvStatusInfo;
|
req->lpvStatusInfo = lpvStatusInfo_copy;
|
||||||
req->dwStatusInfoLength = dwStatusInfoLength;
|
req->dwStatusInfoLength = dwStatusInfoLength;
|
||||||
|
|
||||||
INTERNET_AsyncCall(&workRequest);
|
INTERNET_AsyncCall(&workRequest);
|
||||||
|
|
Loading…
Reference in New Issue