Module: wine Branch: master Commit: b8e2edf19c27c91641a6c26d07b94ecf33839467 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8e2edf19c27c91641a6c26d07...
Author: Piotr Caban piotr@codeweavers.com Date: Fri Mar 8 11:17:53 2013 +0100
cryptnet: Don't ignore HttpEndRequestW error in HTTP_RetrieveEncodedObjectW.
---
dlls/cryptnet/cryptnet_main.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 64af80c..ddfdbce 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -941,19 +941,15 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL, else ret = TRUE; } - /* We don't set ret to TRUE in this block to avoid masking - * an error from HttpSendRequestExW. - */ if (ret && - !HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context) && + !(ret = HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context)) && GetLastError() == ERROR_IO_PENDING) { if (WaitForSingleObject(context->event, context->timeout) == WAIT_TIMEOUT) - { SetLastError(ERROR_TIMEOUT); - ret = FALSE; - } + else + ret = TRUE; } if (ret) ret = CRYPT_DownloadObject(dwRetrievalFlags, hHttp,