Author: cfinck
Date: Sun Jun 15 11:04:03 2008
New Revision: 33984
URL:
http://svn.reactos.org/svn/reactos?rev=33984&view=rev
Log:
Fix yet another invalid use of WriteFile.
This patch has already been submitted to Wine, but as they don't care currently, I
applied it manually here and updated "wininet_ros.diff" accordingly.
Modified:
trunk/reactos/dll/win32/wininet/http.c
trunk/reactos/dll/win32/wininet/wininet_ros.diff
Modified: trunk/reactos/dll/win32/wininet/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Sun Jun 15 11:04:03 2008
@@ -1689,7 +1689,9 @@
if (req->lpszCacheFile)
{
- if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL))
+ DWORD dwBytesWritten;
+
+ if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten,
NULL))
WARN("WriteFile failed: %u\n", GetLastError());
}
p += bytes_read;
Modified: trunk/reactos/dll/win32/wininet/wininet_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
==============================================================================
--- trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] Sun Jun 15 11:04:03
2008
@@ -1,5 +1,5 @@
--- D:/Wine-CVS/wine/dlls/wininet/http.c Wed May 28 14:33:28 2008
-+++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/http.c Sat May 31 11:59:23 2008
++++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/http.c Sun Jun 15 18:16:06 2008
@@ -61,6 +61,8 @@
#include "wine/debug.h"
#include "wine/unicode.h"
@@ -20,6 +20,17 @@
if(!res)
WARN("WriteFile failed: %u\n", GetLastError());
}
+@@ -1686,7 +1689,9 @@
+
+ if (req->lpszCacheFile)
+ {
+- if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL))
++ DWORD dwBytesWritten;
++
++ if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten,
NULL))
+ WARN("WriteFile failed: %u\n", GetLastError());
+ }
+ p += bytes_read;
--- D:/Wine-CVS/wine/dlls/wininet/internet.c Wed May 28 14:33:28 2008
+++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/internet.c Fri May 30 18:04:29 2008
@@ -3101,19 +3101,22 @@