wine/dlls/wininet internet.c

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 28 05:03:34 CST 2005


ChangeSet ID:	21471
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/28 05:03:34

Modified files:
	dlls/wininet   : internet.c 

Log message:
	Robert Shearman <rob at codeweavers.com>
	Change some SendAsyncCallback calls to INTERNET_SendCallback as the
	tests show that the callbacks happen either synchronously or within an
	alternative asynchronous call.
	Remove a check for a NULL lpfnStatusCB that is already performed by
	INTERNET_SendCallback and add a comment about a difference to native.

Patch: http://cvs.winehq.org/patch.py?id=21471

Old revision  New revision  Changes     Path
 1.145         1.146         +12 -10     wine/dlls/wininet/internet.c

Index: wine/dlls/wininet/internet.c
diff -u -p wine/dlls/wininet/internet.c:1.145 wine/dlls/wininet/internet.c:1.146
--- wine/dlls/wininet/internet.c:1.145	28 Nov 2005 11: 3:34 -0000
+++ wine/dlls/wininet/internet.c	28 Nov 2005 11: 3:34 -0000
@@ -951,7 +951,7 @@ BOOL WINAPI INTERNET_FindNextFileW(LPWIN
 
 lend:
 
-    if (lpwh->hdr.dwFlags & INTERNET_FLAG_ASYNC && lpwh->hdr.lpfnStatusCB)
+    if (lpwh->hdr.dwFlags & INTERNET_FLAG_ASYNC)
     {
         INTERNET_ASYNC_RESULT iar;
 
@@ -959,9 +959,9 @@ lend:
         iar.dwError = iar.dwError = bSuccess ? ERROR_SUCCESS :
                                                INTERNET_GetLastError();
 
-        SendAsyncCallback(&lpwh->hdr, lpwh->hdr.dwContext,
-                      INTERNET_STATUS_REQUEST_COMPLETE, &iar,
-                       sizeof(INTERNET_ASYNC_RESULT));
+        INTERNET_SendCallback(&lpwh->hdr, lpwh->hdr.dwContext,
+                              INTERNET_STATUS_REQUEST_COMPLETE, &iar,
+                              sizeof(INTERNET_ASYNC_RESULT));
     }
 
     return bSuccess;
@@ -1015,9 +1015,11 @@ BOOL WINAPI InternetCloseHandle(HINTERNE
         return FALSE;
     }
 
-    SendAsyncCallback(lpwh, lpwh->dwContext,
-                      INTERNET_STATUS_HANDLE_CLOSING, &hInternet,
-                      sizeof(HINTERNET));
+    /* FIXME: native appears to send this from the equivalent of
+     * WININET_Release */
+    INTERNET_SendCallback(lpwh, lpwh->dwContext,
+                          INTERNET_STATUS_HANDLE_CLOSING, &hInternet,
+                          sizeof(HINTERNET));
 
     if( lpwh->lpwhparent )
         WININET_Release( lpwh->lpwhparent );
@@ -1753,9 +1755,9 @@ static BOOL INTERNET_ReadFile(LPWININETH
         iar.dwError = iar.dwError = retval ? ERROR_SUCCESS :
                                              INTERNET_GetLastError();
 
-        SendAsyncCallback(lpwh, lpwh->dwContext,
-                          INTERNET_STATUS_REQUEST_COMPLETE, &iar,
-                          sizeof(INTERNET_ASYNC_RESULT));
+        INTERNET_SendCallback(lpwh, lpwh->dwContext,
+                              INTERNET_STATUS_REQUEST_COMPLETE, &iar,
+                              sizeof(INTERNET_ASYNC_RESULT));
     }
     return retval;
 }



More information about the wine-cvs mailing list