Jacek Caban : rpcrt4: Properly handle async HTTP failures.
Alexandre Julliard
julliard at winehq.org
Tue Aug 14 12:59:54 CDT 2012
Module: wine
Branch: master
Commit: 1de4129b0a0cd4ce4453920ed79663f412ea468d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1de4129b0a0cd4ce4453920ed79663f412ea468d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Aug 14 13:35:46 2012 +0200
rpcrt4: Properly handle async HTTP failures.
---
dlls/rpcrt4/rpc_transport.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 445f186..76a9714 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -1844,6 +1844,7 @@ typedef struct _RpcHttpAsyncData
{
LONG refs;
HANDLE completion_event;
+ WORD async_result;
INTERNET_BUFFERSA inet_buffers;
CRITICAL_SECTION cs;
} RpcHttpAsyncData;
@@ -1897,6 +1898,11 @@ static RPC_STATUS wait_async_request(RpcHttpAsyncData *async_data, BOOL call_ret
}else {
WaitForSingleObject(async_data->completion_event, INFINITE);
}
+ if(async_data->async_result) {
+ ERR("Async request failed with error %d\n", async_data->async_result);
+ return RPC_S_SERVER_UNAVAILABLE;
+ }
+
return RPC_S_OK;
}
@@ -2007,6 +2013,9 @@ static VOID WINAPI rpcrt4_http_internet_callback(
TRACE("INTERNET_STATUS_REQUEST_COMPLETED\n");
if (async_data)
{
+ INTERNET_ASYNC_RESULT *async_result = lpvStatusInformation;
+
+ async_data->async_result = async_result->dwResult ? ERROR_SUCCESS : async_result->dwError;
SetEvent(async_data->completion_event);
RpcHttpAsyncData_Release(async_data);
}
More information about the wine-cvs
mailing list