Jacek Caban : wininet: Use proc instead of enum in HTTPSENDREQUESTW request .

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 26 06:49:18 CST 2006


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Dec 25 21:33:36 2006 +0100

wininet: Use proc instead of enum in HTTPSENDREQUESTW request.

---

 dlls/wininet/http.c     |   23 +++++++++++++++++++----
 dlls/wininet/internet.c |   15 ---------------
 dlls/wininet/internet.h |    1 -
 3 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 8327b8b..ff66390 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -180,6 +180,20 @@ static void HTTP_FreeTokens(LPWSTR * tok
  * Helper functions for the HttpSendRequest(Ex) functions
  * 
  */
+static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest)
+{
+    struct WORKREQ_HTTPSENDREQUESTW const *req = &workRequest->u.HttpSendRequestW;
+    LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest->hdr;
+
+    TRACE("%p\n", lpwhr);
+
+    HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
+            req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
+            req->dwContentLength, req->bEndRequest);
+
+    HeapFree(GetProcessHeap(), 0, req->lpszHeader);
+}
+
 static void HTTP_FixVerb( LPWININETHTTPREQW lpwhr )
 {
     /* if the verb is NULL default to GET */
@@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET
         WORKREQUEST workRequest;
         struct WORKREQ_HTTPSENDREQUESTW *req;
 
-        workRequest.asyncall = HTTPSENDREQUESTW;
+        workRequest.asyncall = CALLASYNCPROC;
+        workRequest.asyncproc = AsyncHttpSendRequestProc;
         workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
         req = &workRequest.u.HttpSendRequestW;
         if (lpBuffersIn)
@@ -1873,8 +1888,9 @@ BOOL WINAPI HttpSendRequestW(HINTERNET h
         WORKREQUEST workRequest;
         struct WORKREQ_HTTPSENDREQUESTW *req;
 
-        workRequest.asyncall = HTTPSENDREQUESTW;
-	workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
+        workRequest.asyncall = CALLASYNCPROC;
+        workRequest.asyncproc = AsyncHttpSendRequestProc;
+        workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
         req = &workRequest.u.HttpSendRequestW;
         if (lpszHeaders)
             req->lpszHeader = WININET_strdupW(lpszHeaders);
@@ -2351,7 +2367,6 @@ lend:
     return bSuccess;
 }
 
-
 /***********************************************************************
  *           HTTP_Connect  (internal)
  *
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index d5a4976..ab5c955 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void)
         }
 	break;
 
-    case HTTPSENDREQUESTW:
-        {
-        struct WORKREQ_HTTPSENDREQUESTW *req = &workRequest.u.HttpSendRequestW;
-        LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest.hdr;
-
-        TRACE("HTTPSENDREQUESTW %p\n", lpwhr);
-
-        HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
-                req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
-                req->dwContentLength, req->bEndRequest);
-
-        HeapFree(GetProcessHeap(), 0, req->lpszHeader);
-        }
-        break;
-
     case HTTPOPENREQUESTW:
         {
         struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h
index 6868b78..9935aa6 100644
--- a/dlls/wininet/internet.h
+++ b/dlls/wininet/internet.h
@@ -261,7 +261,6 @@ typedef enum
     FTPREMOVEDIRECTORYW,
     FTPRENAMEFILEW,
     FTPFINDNEXTW,
-    HTTPSENDREQUESTW,
     HTTPOPENREQUESTW,
     INTERNETOPENURLW,
     INTERNETREADFILEEXA,




More information about the wine-cvs mailing list