[PATCH 6/6] urlmon: Handle http errors when binding asynchronously.
David Hedberg
dhedberg at codeweavers.com
Tue Dec 21 17:50:28 CST 2010
---
dlls/urlmon/http.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index 1ed5e15..4ae567f 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -479,13 +479,33 @@ static void HttpProtocol_close_connection(Protocol *prot)
}
}
+static void HttpProtocol_on_error(Protocol *prot, DWORD error)
+{
+ HttpProtocol *This = ASYNCPROTOCOL_THIS(prot);
+ HRESULT hres;
+
+ TRACE("%p, %08x\n", This, error);
+
+ while((hres = handle_http_error(This, error)) == RPC_E_RETRY) {
+ error = send_http_request(This);
+
+ if(error == ERROR_IO_PENDING || error == ERROR_SUCCESS)
+ return;
+ }
+
+ protocol_close_connection(prot);
+ protocol_abort(prot, hres);
+ return;
+}
+
#undef ASYNCPROTOCOL_THIS
static const ProtocolVtbl AsyncProtocolVtbl = {
HttpProtocol_open_request,
HttpProtocol_end_request,
HttpProtocol_start_downloading,
- HttpProtocol_close_connection
+ HttpProtocol_close_connection,
+ HttpProtocol_on_error
};
static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv)
--
1.7.3.4
More information about the wine-patches
mailing list