Hans Leidekker : winhttp/tests: Wait for a handle closing notification.
Alexandre Julliard
julliard at winehq.org
Wed Feb 17 10:12:04 CST 2010
Module: wine
Branch: master
Commit: 33e522eec677ab4101ccd4b7c99fc3e3e229845a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=33e522eec677ab4101ccd4b7c99fc3e3e229845a
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Feb 17 09:56:19 2010 +0100
winhttp/tests: Wait for a handle closing notification.
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 );
}
More information about the wine-cvs
mailing list