Subject: winex/dlls/wininet internet.c,1.21,1.22Update of /var/lib/cvsd/cvsroot/winex/dlls/wininet
In directory agravaine:/tmp/cvs-serv16842/dlls/wininet
Modified Files:
internet.c
Log Message:
Hack for World of Warcraft to make reading big files from the webserver
complete in finite time: after every partial read, it waits for another
callback to notify it of additional data, so we'll send a fake notification
after every such read. (A proper fix would require a major rewrite.)
Index: internet.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/wininet/internet.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- internet.c 25 May 2007 21:47:16 -0000 1.21
+++ internet.c 25 May 2007 21:47:23 -0000 1.22
@@ -1383,12 +1383,15 @@
BOOL retval = FALSE;
int nSocket = -1;
LPWININETHANDLEHEADER lpwh = (LPWININETHANDLEHEADER) hFile;
+ LPWININETAPPINFOA hIC = NULL;
TRACE("%p %p %ld %ld\n", hFile, lpBuffersOut, dwFlags, dwContext);
if (NULL == lpwh)
return FALSE;
+ hIC = (LPWININETAPPINFOA) lpwh->lpwhparent;
+
/* FIXME: this should use NETCON functions! */
switch (lpwh->htype)
{
@@ -1422,6 +1425,15 @@
break;
}
+ /* hack for WoW; whenever we do a partial read, it waits for another RESPONSE_RECEIVED.
+ * We should probably send one when we actually receive data on the socket, but
+ * that's not possible right now without a major rewrite of the netcon stuff. */
+ if (retval && lpBuffersOut->dwBufferLength) {
+ DWORD len = 0;
+ TRACE("firing callback\n");
+ SendAsyncCallback(lpwh, hIC, lpwh, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, &len, sizeof(len));
+ }
+
TRACE("-- %s (bytes read: %ld)\n", retval ? "TRUE": "FALSE", lpBuffersOut->dwBufferLength);
return retval;
}
@@ -1442,12 +1454,15 @@
BOOL retval = FALSE;
int nSocket = -1;
LPWININETHANDLEHEADER lpwh = (LPWININETHANDLEHEADER) hFile;
+ LPWININETAPPINFOA hIC = NULL;
TRACE("%p %p %ld %ld\n", hFile, lpBuffersOut, dwFlags, dwContext);
if (NULL == lpwh)
return FALSE;
+ hIC = (LPWININETAPPINFOA) lpwh->lpwhparent;
+
/* FIXME: this should use NETCON functions! */
switch (lpwh->htype)
{
@@ -1482,6 +1497,15 @@
break;
}
+ /* hack for WoW; whenever we do a partial read, it waits for another RESPONSE_RECEIVED.
+ * We should probably send one when we actually receive data on the socket, but
+ * that's not possible right now without a major rewrite of the netcon stuff. */
+ if (retval && lpBuffersOut->dwBufferLength) {
+ DWORD len = 0;
+ TRACE("firing callback\n");
+ SendAsyncCallback(lpwh, hIC, lpwh, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, &len, sizeof(len));
+ }
+
TRACE("-- %s (bytes read: %ld)\n", retval ? "TRUE": "FALSE", lpBuffersOut->dwBufferLength);
return retval;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.