From bf5487bfc13cc253aa1f7cf3f6e9e7b4a90389a3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 31 Jan 2008 18:10:18 +0100 Subject: [PATCH] urlmon: Return better error results. --- dlls/urlmon/binding.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 66b5bdfd66b..1cc8a61d069 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -1283,7 +1283,7 @@ static HRESULT get_callback(IBindCtx *pbc, IBindStatusCallback **callback) IUnknown_Release(unk); } - return SUCCEEDED(hres) ? S_OK : MK_E_SYNTAX; + return SUCCEEDED(hres) ? S_OK : INET_E_DATA_NOT_AVAILABLE; } static BOOL is_urlmon_protocol(LPCWSTR url) @@ -1484,9 +1484,7 @@ HRESULT bind_to_storage(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv) if(FAILED(hres)) return hres; - if(binding->hres != S_OK) { - hres = SUCCEEDED(binding->hres) ? S_OK : binding->hres; - }else if(binding->stream->init_buf) { + if(binding->hres == S_OK && binding->stream->init_buf) { if((binding->state & BINDING_STOPPED) && (binding->state & BINDING_LOCKED)) IInternetProtocol_UnlockRequest(binding->protocol);