Misha Koshelev : urlmon: Remove FLAG_CALLED_SWITCH, which is now redundant.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 19 07:59:46 CDT 2007


Module: wine
Branch: master
Commit: 442ec6acdd7333a93de50097b10336ac22e20b38
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=442ec6acdd7333a93de50097b10336ac22e20b38

Author: Misha Koshelev <mk144210 at bcm.edu>
Date:   Wed Jul 18 19:57:32 2007 -0500

urlmon: Remove FLAG_CALLED_SWITCH, which is now redundant.

---

 dlls/urlmon/http.c |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index 3914bdb..d7ec406 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -62,18 +62,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
  * if OnResponse does not return S_OK, Continue will not report data, and Read
  * will report BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION when all
  * data has been read.
- *
- * FLAG_CALLED_SWITCH is set before calling the protocol sink Switch function and
- * unset by our Continue function to ensure that Switch is not called again until
- * Continue is executed by the protocol sink.
  */
 #define FLAG_REQUEST_COMPLETE 0x1
-#define FLAG_CALLED_SWITCH 0x2
-#define FLAG_FIRST_CONTINUE_COMPLETE 0x4
-#define FLAG_FIRST_DATA_REPORTED 0x8
-#define FLAG_ALL_DATA_READ 0x10
-#define FLAG_LAST_DATA_REPORTED 0x20
-#define FLAG_RESULT_REPORTED 0x40
+#define FLAG_FIRST_CONTINUE_COMPLETE 0x2
+#define FLAG_FIRST_DATA_REPORTED 0x4
+#define FLAG_ALL_DATA_READ 0x8
+#define FLAG_LAST_DATA_REPORTED 0x10
+#define FLAG_RESULT_REPORTED 0x20
 
 typedef struct {
     const IInternetProtocolVtbl *lpInternetProtocolVtbl;
@@ -179,10 +174,7 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
         ulStatusCode = BINDSTATUS_SENDINGREQUEST;
         break;
     case INTERNET_STATUS_REQUEST_COMPLETE:
-        if (This->flags & FLAG_CALLED_SWITCH)
-            return;
-        This->flags |= FLAG_CALLED_SWITCH | FLAG_REQUEST_COMPLETE;
-
+        This->flags |= FLAG_REQUEST_COMPLETE;
         /* PROTOCOLDATA same as native */
         memset(&data, 0, sizeof(data));
         data.dwState = 0xf1000000;
@@ -515,8 +507,6 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
         goto done;
     }
 
-    This->flags &= ~FLAG_CALLED_SWITCH;
-
     if (pProtocolData->pData == (LPVOID)BINDSTATUS_DOWNLOADINGDATA)
     {
         if (!HttpQueryInfoW(This->request, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER,




More information about the wine-cvs mailing list