[WININET] Fix asynchronous mode for InternetOpenUrlA
Lionel Ulmer
lionel.ulmer at free.fr
Wed Feb 4 17:44:59 CST 2004
When in asynchronous mode, HttpSendRequestA always returns 0 and sets a
special error cause.. This means that as the way that InternetOpenUrlA was
written, this was failing all the time (and lead to a crash due to the fact
that wininet does not like cancelling of an on-going asynchronous
procedure).
Lionel
Changelog:
Handle properly asynchronous HttpSendRequestA
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/wininet/internet.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.73
diff -u -r1.73 internet.c
--- dlls/wininet/internet.c 30 Dec 2003 19:16:37 -0000 1.73
+++ dlls/wininet/internet.c 4 Feb 2004 23:41:14 -0000
@@ -1923,7 +1923,7 @@
return NULL;
}
HttpAddRequestHeadersA(client1, lpszHeaders, dwHeadersLength, HTTP_ADDREQ_FLAG_ADD);
- if(!HttpSendRequestA(client1, NULL, 0, NULL, 0)) {
+ if((!HttpSendRequestA(client1, NULL, 0, NULL, 0)) && (GetLastError() != ERROR_IO_PENDING)) {
InternetCloseHandle(client1);
InternetCloseHandle(client);
return NULL;
More information about the wine-patches
mailing list