Author: cgutman
Date: Fri Oct 28 18:58:43 2011
New Revision: 54263
URL:
http://svn.reactos.org/svn/reactos?rev=54263&view=rev
Log:
[WININET]
- Disable connection keep-alive to avoid calling into msafd to close the connection later
during DLL_PROCESS_DETACH
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] Fri Oct 28 18:58:43 2011
@@ -245,8 +245,17 @@
if(InterlockedDecrement(&server->ref))
return;
+#ifndef __REACTOS__
if(!server->ref)
server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
+#else
+ EnterCriticalSection(&connection_pool_cs);
+ list_remove(&server->entry);
+ LeaveCriticalSection(&connection_pool_cs);
+
+ heap_free(server->name);
+ heap_free(server);
+#endif
}
static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
@@ -1861,6 +1870,7 @@
if(!req->netconn)
return;
+#ifndef __REACTOS__
if(reuse && req->netconn->keep_alive) {
BOOL run_collector;
@@ -1893,6 +1903,7 @@
}
return;
}
+#endif
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
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] Fri Oct 28 18:58:43
2011
@@ -92,3 +92,41 @@
for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]);
i++)
{
WCHAR wszCachePath[MAX_PATH];
+Index: dll/win32/wininet/http.c
+===================================================================
+--- dll/win32/wininet/http.c (revision 54234)
++++ dll/win32/wininet/http.c (working copy)
+@@ -245,8 +245,17 @@
+ if(InterlockedDecrement(&server->ref))
+ return;
+
++#ifndef __REACTOS__
+ if(!server->ref)
+ server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
++#else
++ EnterCriticalSection(&connection_pool_cs);
++ list_remove(&server->entry);
++ LeaveCriticalSection(&connection_pool_cs);
++
++ heap_free(server->name);
++ heap_free(server);
++#endif
+ }
+
+ static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
+@@ -1861,6 +1870,7 @@
+ if(!req->netconn)
+ return;
+
++#ifndef __REACTOS__
+ if(reuse && req->netconn->keep_alive) {
+ BOOL run_collector;
+
+@@ -1893,6 +1903,7 @@
+ }
+ return;
+ }
++#endif
+
+ INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
+ INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);