Author: rharabien Date: Tue Jan 17 17:59:26 2012 New Revision: 54992
URL: http://svn.reactos.org/svn/reactos?rev=54992&view=rev Log: [WININET] - Don't use shell32 functions when processing DLL_PROCESS_ATTACH because shell32.dll can be initialized later. Fixes shell32+wininet debug spam at boot.
Modified: trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/dll/win32/wininet/urlcache.c trunk/reactos/dll/win32/wininet/wininet_ros.diff
Modified: trunk/reactos/dll/win32/wininet/internet.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet.... ============================================================================== --- trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] Tue Jan 17 17:59:26 2012 @@ -291,8 +291,6 @@
if (g_dwTlsErrIndex == TLS_OUT_OF_INDEXES) return FALSE; - - URLCacheContainers_CreateDefaults();
WININET_hModule = hinstDLL;
Modified: trunk/reactos/dll/win32/wininet/urlcache.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache.... ============================================================================== --- trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] Tue Jan 17 17:59:26 2012 @@ -182,6 +182,7 @@
/* List of all containers available */ static struct list UrlContainers = LIST_INIT(UrlContainers); +BOOL bDefaultContainersAdded = FALSE;
static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ENTRY *pPrevHash, HASH_CACHEFILE_ENTRY **ppHash);
@@ -591,6 +592,9 @@ if(!lpwszUrl) return ERROR_INVALID_PARAMETER;
+ if (!bDefaultContainersAdded) + URLCacheContainers_CreateDefaults(); + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) { int prefix_len = strlenW(pContainer->cache_prefix); @@ -628,6 +632,9 @@ /* non-NULL search pattern only returns one container ever */ if (lpwszSearchPattern && dwIndex > 0) return FALSE; + + if (!bDefaultContainersAdded) + URLCacheContainers_CreateDefaults();
LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) { @@ -1532,6 +1539,9 @@ return FALSE; }
+ if (!bDefaultContainersAdded) + URLCacheContainers_CreateDefaults(); + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) { /* The URL cache has prefix L"" (unlike Cookies and History) */
Modified: trunk/reactos/dll/win32/wininet/wininet_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_r... ============================================================================== --- trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] Tue Jan 17 17:59:26 2012 @@ -40,7 +40,16 @@ * NETCON_create --- wine-1.3.4/dlls/wininet/internet.c 2010-10-01 14:46:44.000000000 -0400 +++ dll/win32/wininet/internet.c 2010-10-09 15:33:04.000000000 -0400 -@@ -3569,19 +3569,22 @@ +@@ -292,8 +292,6 @@ + if (g_dwTlsErrIndex == TLS_OUT_OF_INDEXES) + return FALSE; + +- URLCacheContainers_CreateDefaults(); +- + WININET_hModule = hinstDLL; + + case DLL_THREAD_ATTACH: +@@ -3569,19 +3567,22 @@
LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen) { @@ -71,7 +80,15 @@ =================================================================== --- dll/win32/wininet/urlcache.c (revision 50814) +++ dll/win32/wininet/urlcache.c (working copy) -@@ -527,6 +527,7 @@ +@@ -182,6 +182,7 @@ + + /* List of all containers available */ + static struct list UrlContainers = LIST_INIT(UrlContainers); ++BOOL bDefaultContainersAdded = FALSE; + + static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ENTRY *pPrevHash, HASH_CACHEFILE_ENTRY **ppHash); + +@@ -527,6 +528,7 @@ static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0}; static const WCHAR CookieSuffix[] = {0}; static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0}; @@ -79,7 +96,7 @@ static const struct { int nFolder; /* CSIDL_* constant */ -@@ -540,6 +541,12 @@ +@@ -540,6 +542,12 @@ }; DWORD i;
@@ -92,6 +109,36 @@ for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) { WCHAR wszCachePath[MAX_PATH]; +@@ -584,6 +592,9 @@ + if(!lpwszUrl) + return ERROR_INVALID_PARAMETER; + ++ if (!bDefaultContainersAdded) ++ URLCacheContainers_CreateDefaults(); ++ + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) + { + int prefix_len = strlenW(pContainer->cache_prefix); +@@ -622,6 +633,9 @@ + if (lpwszSearchPattern && dwIndex > 0) + return FALSE; + ++ if (!bDefaultContainersAdded) ++ URLCacheContainers_CreateDefaults(); ++ + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) + { + if (lpwszSearchPattern) +@@ -1525,6 +1539,9 @@ + return FALSE; + } + ++ if (!bDefaultContainersAdded) ++ URLCacheContainers_CreateDefaults(); ++ + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) + { + /* The URL cache has prefix L"" (unlike Cookies and History) */ Index: dll/win32/wininet/http.c =================================================================== --- dll/win32/wininet/http.c (revision 54234)