winhttp/tests: Wait for a handle closing notification.

Hans Leidekker hans at codeweavers.com
Wed Feb 17 02:56:19 CST 2010


Fixes a Valgrind warning.
---
 dlls/winhttp/tests/notification.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c
index 60e1595..bd6db58 100644
--- a/dlls/winhttp/tests/notification.c
+++ b/dlls/winhttp/tests/notification.c
@@ -88,7 +88,10 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW
         }
     }
     if (status_ok) info->index++;
-    if (status & WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS) SetEvent( info->wait );
+    if (status & (WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS | WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING))
+    {
+        SetEvent( info->wait );
+    }
 }
 
 static const struct notification cache_test[] =
@@ -380,6 +383,8 @@ static void test_async( void )
     WinHttpCloseHandle( req );
     WinHttpCloseHandle( con );
     WinHttpCloseHandle( ses );
+
+    WaitForSingleObject( info.wait, INFINITE );
     CloseHandle( info.wait );
 }
 
-- 
1.6.3.3




More information about the wine-patches mailing list