1 --- wine-1.3.4/dlls/wininet/internet.h 2010-10-01 14:46:44.000000000 -0400
2 +++ dll/win32/wininet/internet.h 2010-10-09 15:34:13.000000000 -0400
4 LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection);
5 int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection);
6 DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value);
7 -int sock_get_error(int);
8 +#define sock_get_error(x) WSAGetLastError()
10 extern void URLCacheContainers_CreateDefaults(void);
11 extern void URLCacheContainers_DeleteAll(void);
12 --- wine-1.3.4/dlls/wininet/http.c 2010-10-01 14:46:44.000000000 -0400
13 +++ dll/win32/wininet/http.c 2010-10-09 15:28:29.000000000 -0400
15 #include "wine/exception.h"
16 #include "wine/unicode.h"
18 +#include "inet_ntop.c"
20 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
22 static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0};
23 --- wine-1.3.4/dlls/wininet/netconnection.c 2010-10-01 14:46:44.000000000 -0400
24 +++ dll/win32/wininet/netconnection.c 2010-10-09 15:33:53.000000000 -0400
30 /* translate a unix error code into a winsock one */
31 int sock_get_error( int err )
39 /******************************************************************************
41 --- wine-1.3.4/dlls/wininet/internet.c 2010-10-01 14:46:44.000000000 -0400
42 +++ dll/win32/wininet/internet.c 2010-10-09 15:33:04.000000000 -0400
44 if (g_dwTlsErrIndex == TLS_OUT_OF_INDEXES)
47 - URLCacheContainers_CreateDefaults();
49 WININET_hModule = hinstDLL;
51 case DLL_THREAD_ATTACH:
52 @@ -3569,19 +3567,22 @@
54 LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen)
59 BOOL bSuccess = FALSE;
61 LPSTR lpszBuffer = INTERNET_GetResponseBuffer();
66 - pfd.events = POLLIN;
68 + FD_SET(nSocket,&infd);
69 + tv.tv_sec = RESPONSE_TIMEOUT;
72 while (nRecv < MAX_REPLY_LEN)
74 - if (poll(&pfd,1, RESPONSE_TIMEOUT * 1000) > 0)
75 + if (select(0, &infd, NULL, NULL, &tv) > 0)
77 if (recv(nSocket, &lpszBuffer[nRecv], 1, 0) <= 0)
79 Index: dll/win32/wininet/urlcache.c
80 ===================================================================
81 --- dll/win32/wininet/urlcache.c (revision 50814)
82 +++ dll/win32/wininet/urlcache.c (working copy)
85 /* List of all containers available */
86 static struct list UrlContainers = LIST_INIT(UrlContainers);
87 +BOOL bDefaultContainersAdded = FALSE;
89 static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ENTRY *pPrevHash, HASH_CACHEFILE_ENTRY **ppHash);
92 static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0};
93 static const WCHAR CookieSuffix[] = {0};
94 static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0};
95 + static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0};
98 int nFolder; /* CSIDL_* constant */
103 + if (GetEnvironmentVariableW(UserProfile, NULL, 0) == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)
105 + TRACE("Environment variable 'USERPROFILE' does not exist!\n");
109 for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++)
111 WCHAR wszCachePath[MAX_PATH];
114 return ERROR_INVALID_PARAMETER;
116 + if (!bDefaultContainersAdded)
117 + URLCacheContainers_CreateDefaults();
119 LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry)
121 int prefix_len = strlenW(pContainer->cache_prefix);
123 if (lpwszSearchPattern && dwIndex > 0)
126 + if (!bDefaultContainersAdded)
127 + URLCacheContainers_CreateDefaults();
129 LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry)
131 if (lpwszSearchPattern)
132 @@ -1525,6 +1539,9 @@
136 + if (!bDefaultContainersAdded)
137 + URLCacheContainers_CreateDefaults();
139 LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry)
141 /* The URL cache has prefix L"" (unlike Cookies and History) */
142 Index: dll/win32/wininet/http.c
143 ===================================================================
144 --- dll/win32/wininet/http.c (revision 54234)
145 +++ dll/win32/wininet/http.c (working copy)
147 if(InterlockedDecrement(&server->ref))
152 server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
154 + EnterCriticalSection(&connection_pool_cs);
155 + list_remove(&server->entry);
156 + LeaveCriticalSection(&connection_pool_cs);
158 + heap_free(server->name);
163 static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
164 @@ -1861,6 +1870,7 @@
169 if(reuse && req->netconn->keep_alive) {
172 @@ -1893,6 +1903,7 @@
178 INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
179 INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);