[PATCH] winhttp: Always send a callback from async query_data_available

Ross Lagerwall rosslagerwall at gmail.com
Sat Sep 14 04:54:17 CDT 2013


This fixes a regression where an async query to check for data available does
not send a callback when async is true and the end of read data occurs. This
was introduced by commit bb3097f01e53 (winhttp: Add a read-ahead buffer to
allow WinHttpQueryDataAvailable to return the right values in chunked mode.).
---
 dlls/winhttp/request.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index db8e6af..fa5bd28 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2395,6 +2395,7 @@ static BOOL query_data_available( request_t *request, DWORD *available, BOOL asy
         if (end_of_read_data( request ))
         {
             if (available) *available = 0;
+            if (async) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, &count, sizeof(count) );
             return TRUE;
         }
     }
-- 
1.8.3.1




More information about the wine-patches mailing list