winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
708 discussions
Start a n
N
ew thread
Jacek Caban : wininet: Use proxy settings directly from http_request_t in a few more places.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: 3e23b5e589739a7a580361dcaca0566498eebb28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e23b5e589739a7a580361dca…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:48:08 2012 +0100 wininet: Use proxy settings directly from http_request_t in a few more places. --- dlls/wininet/http.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 9df90a9..39978b2 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1950,7 +1950,6 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe switch(option) { case INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO: { - http_session_t *session = req->session; INTERNET_DIAGNOSTIC_SOCKET_INFO *info = buffer; FIXME("INTERNET_DIAGNOSTIC_SOCKET_INFO stub\n"); @@ -1964,11 +1963,11 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe info->Socket = 0; /* FIXME: get source port from req->netConnection */ info->SourcePort = 0; - info->DestPort = session->hostPort; + info->DestPort = req->server->port; info->Flags = 0; if (HTTP_KeepAlive(req)) info->Flags |= IDSI_FLAG_KEEP_ALIVE; - if (session->appInfo->proxy && session->appInfo->proxy[0] != 0) + if (req->proxy) info->Flags |= IDSI_FLAG_PROXY; if (req->netconn->useSSL) info->Flags |= IDSI_FLAG_SECURE; @@ -2159,7 +2158,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe * INTERNET_REQFLAG_CACHE_WRITE_DISABLED */ - if(req->session->appInfo->proxy) + if(req->proxy) flags |= INTERNET_REQFLAG_VIA_PROXY; if(!req->rawHeaders) flags |= INTERNET_REQFLAG_NO_HEADERS; @@ -4838,7 +4837,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)) HTTP_InsertCookies(request); - if (request->session->appInfo->proxy && request->session->appInfo->proxy[0]) + if (request->proxy) { WCHAR *url = build_proxy_path_url(request); requestString = HTTP_BuildHeaderRequestString(request, request->verb, url, request->version);
1
0
0
0
Jacek Caban : wininet: Use processed string from server_t for constructing proxy path.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: 5fb49243af34c9d5ed071c4afce6436a1fb36df5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5fb49243af34c9d5ed071c4af…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:47:50 2012 +0100 wininet: Use processed string from server_t for constructing proxy path. --- dlls/wininet/http.c | 48 ++++++++++++++++-------------------------------- 1 files changed, 16 insertions(+), 32 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index af40b6f..9df90a9 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1679,41 +1679,25 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn return TRUE; } -static WCHAR *HTTP_BuildProxyRequestUrl(http_request_t *req) +static WCHAR *build_proxy_path_url(http_request_t *req) { - static const WCHAR slash[] = { '/',0 }; - static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','u',0 }; - static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','u',0 }; - http_session_t *session = req->session; - WCHAR new_location[INTERNET_MAX_URL_LENGTH], *url; - DWORD size; - - size = sizeof(new_location); - if (HTTP_HttpQueryInfoW(req, HTTP_QUERY_LOCATION, new_location, &size, NULL) == ERROR_SUCCESS) - { - URL_COMPONENTSW UrlComponents; - - if (!(url = heap_alloc(size + sizeof(WCHAR)))) return NULL; - strcpyW( url, new_location ); + DWORD size, len; + WCHAR *url; - ZeroMemory(&UrlComponents,sizeof(URL_COMPONENTSW)); - if(InternetCrackUrlW(url, 0, 0, &UrlComponents)) goto done; - heap_free(url); - } + len = strlenW(req->server->scheme_host_port); + size = len + strlenW(req->path) + 1; + if(*req->path != '/') + size++; + url = heap_alloc(size * sizeof(WCHAR)); + if(!url) + return NULL; - size = 16; /* "https://" + sizeof(port#) + ":/\0" */ - size += strlenW( session->hostName ) + strlenW( req->path ); + memcpy(url, req->server->scheme_host_port, len*sizeof(WCHAR)); + if(*req->path != '/') + url[len++] = '/'; - if (!(url = heap_alloc(size * sizeof(WCHAR)))) return NULL; + strcpyW(url+len, req->path); - if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) - sprintfW( url, formatSSL, session->hostName, session->hostPort ); - else - sprintfW( url, format, session->hostName, session->hostPort ); - if (req->path[0] != '/') strcatW( url, slash ); - strcatW( url, req->path ); - -done: TRACE("url=%s\n", debugstr_w(url)); return url; } @@ -4856,7 +4840,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, if (request->session->appInfo->proxy && request->session->appInfo->proxy[0]) { - WCHAR *url = HTTP_BuildProxyRequestUrl(request); + WCHAR *url = build_proxy_path_url(request); requestString = HTTP_BuildHeaderRequestString(request, request->verb, url, request->version); heap_free(url); }
1
0
0
0
Jacek Caban : wininet: Store more useful strings in server_t.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: 3cf2838a932e606fe6f494e2e9701091a37e32f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3cf2838a932e606fe6f494e2e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:47:19 2012 +0100 wininet: Store more useful strings in server_t. --- dlls/wininet/http.c | 63 ++++++++++++++++++++++++---------------------- dlls/wininet/internet.h | 4 +++ 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 733a535..af40b6f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -248,9 +248,37 @@ void server_release(server_t *server) if(server->cert_chain) CertFreeCertificateChain(server->cert_chain); heap_free(server->name); + heap_free(server->scheme_host_port); heap_free(server); } +static BOOL process_host_port(server_t *server) +{ + BOOL default_port; + size_t name_len; + WCHAR *buf; + + static const WCHAR httpW[] = {'h','t','t','p',0}; + static const WCHAR httpsW[] = {'h','t','t','p','s',0}; + static const WCHAR formatW[] = {'%','s',':','/','/','%','s',':','%','u',0}; + + name_len = strlenW(server->name); + buf = heap_alloc((name_len + 10 /* strlen("://:<port>") */)*sizeof(WCHAR) + sizeof(httpsW)); + if(!buf) + return FALSE; + + sprintfW(buf, formatW, server->is_https ? httpsW : httpW, server->name, server->port); + server->scheme_host_port = buf; + + server->host_port = server->scheme_host_port + 7 /* strlen("http://") */; + if(server->is_https) + server->host_port++; + + default_port = server->port == (server->is_https ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT); + server->canon_host_port = default_port ? server->name : server->host_port; + return TRUE; +} + server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL is_https, BOOL do_create) { server_t *iter, *server = NULL; @@ -276,7 +304,7 @@ server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL is_https, BOOL server->is_https = is_https; list_init(&server->conn_pool); server->name = heap_strdupW(name); - if(server->name) { + if(server->name && process_host_port(server)) { list_add_head(&connection_pool, &server->entry); }else { heap_free(server); @@ -3241,27 +3269,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->verb = heap_strdupW(lpszVerb && *lpszVerb ? lpszVerb : szGET); request->version = heap_strdupW(lpszVersion ? lpszVersion : g_szHttp1_1); - if (session->hostPort != INTERNET_INVALID_PORT_NUMBER && - session->hostPort != INTERNET_DEFAULT_HTTP_PORT && - session->hostPort != INTERNET_DEFAULT_HTTPS_PORT) - { - WCHAR *host_name; - - static const WCHAR host_formatW[] = {'%','s',':','%','u',0}; - - host_name = heap_alloc((strlenW(session->hostName) + 7 /* length of ":65535" + 1 */) * sizeof(WCHAR)); - if (!host_name) { - res = ERROR_OUTOFMEMORY; - goto lend; - } - - sprintfW(host_name, host_formatW, session->hostName, session->hostPort); - HTTP_ProcessHeader(request, hostW, host_name, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); - heap_free(host_name); - } - else - HTTP_ProcessHeader(request, hostW, session->hostName, - HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + HTTP_ProcessHeader(request, hostW, request->server->canon_host_port, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); if (session->hostPort == INTERNET_INVALID_PORT_NUMBER) session->hostPort = (dwFlags & INTERNET_FLAG_SECURE ? @@ -3275,7 +3283,6 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, INTERNET_STATUS_HANDLE_CREATED, &request->hdr.hInternet, sizeof(HINTERNET)); -lend: TRACE("<-- %u (%p)\n", res, request); if(res != ERROR_SUCCESS) { @@ -4080,22 +4087,18 @@ static LPWSTR HTTP_build_req( LPCWSTR *list, int len ) static DWORD HTTP_SecureProxyConnect(http_request_t *request) { server_t *server = request->server; - LPWSTR lpszPath; LPWSTR requestString; INT len; INT cnt; INT responseLen; char *ascii_req; DWORD res; - static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0}; - static const WCHAR szFormat[] = {'%','s',':','%','u',0}; + + static const WCHAR connectW[] = {'C','O','N','N','E','C','T',0}; TRACE("\n"); - lpszPath = heap_alloc((lstrlenW(server->name) + 13)*sizeof(WCHAR)); - sprintfW(lpszPath, szFormat, server->name, server->port); - requestString = HTTP_BuildHeaderRequestString( request, szConnect, lpszPath, g_szHttp1_1 ); - heap_free( lpszPath ); + requestString = HTTP_BuildHeaderRequestString( request, connectW, server->host_port, g_szHttp1_1 ); len = WideCharToMultiByte( CP_ACP, 0, requestString, -1, NULL, 0, NULL, NULL ); diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index b932114..09db338 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -63,6 +63,10 @@ typedef struct { socklen_t addr_len; char addr_str[INET6_ADDRSTRLEN]; + WCHAR *scheme_host_port; + const WCHAR *host_port; + const WCHAR *canon_host_port; + LONG ref; DWORD security_flags;
1
0
0
0
Jacek Caban : wininet: Allow passing INTERNET_INVALID_PORT_NUMBER port to get_server.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: e1d26a24ed2a8ef0c27439ab68fef579acb3968d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1d26a24ed2a8ef0c27439ab6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:47:06 2012 +0100 wininet: Allow passing INTERNET_INVALID_PORT_NUMBER port to get_server. --- dlls/wininet/http.c | 13 ++++--------- dlls/wininet/internet.c | 3 --- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 27f8e85..733a535 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -255,6 +255,9 @@ server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL is_https, BOOL { server_t *iter, *server = NULL; + if(port == INTERNET_INVALID_PORT_NUMBER) + port = is_https ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT; + EnterCriticalSection(&connection_pool_cs); LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) { @@ -1723,9 +1726,6 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req if( !request->path ) request->path = szNul; - if(UrlComponents.nPort == INTERNET_INVALID_PORT_NUMBER) - UrlComponents.nPort = INTERNET_DEFAULT_HTTP_PORT; - new_server = get_server(UrlComponents.lpszHostName, UrlComponents.nPort, UrlComponents.nScheme == INTERNET_SCHEME_HTTPS, TRUE); if(!new_server) return FALSE; @@ -3164,7 +3164,6 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, { appinfo_t *hIC = session->appInfo; http_request_t *request; - INTERNET_PORT port; DWORD len, res = ERROR_SUCCESS; TRACE("-->\n"); @@ -3191,11 +3190,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->session = session; list_add_head( &session->hdr.children, &request->hdr.entry ); - port = session->hostPort; - if(port == INTERNET_INVALID_PORT_NUMBER) - port = dwFlags & INTERNET_FLAG_SECURE ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT; - - request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE); + request->server = get_server(session->hostName, session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE); if(!request->server) { WININET_Release(&request->hdr); return ERROR_OUTOFMEMORY; diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index d982207..d04e825 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -4428,9 +4428,6 @@ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT return FALSE; } - if(url.nPort == INTERNET_INVALID_PORT_NUMBER) - url.nPort = INTERNET_DEFAULT_HTTPS_PORT; - server = get_server(hostname, url.nPort, TRUE, FALSE); if(!server) { SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND);
1
0
0
0
Jacek Caban : wininet: Store an info if connection is HTTPS in server_t.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: cdf25ee4693dbb5b2144db62394f5588b40aedbe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cdf25ee4693dbb5b2144db623…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:46:50 2012 +0100 wininet: Store an info if connection is HTTPS in server_t. --- dlls/wininet/http.c | 11 ++++++----- dlls/wininet/internet.c | 2 +- dlls/wininet/internet.h | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 3eb0b8d..27f8e85 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -251,14 +251,14 @@ void server_release(server_t *server) heap_free(server); } -server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL do_create) +server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL is_https, BOOL do_create) { server_t *iter, *server = NULL; EnterCriticalSection(&connection_pool_cs); LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) { - if(iter->port == port && !strcmpW(iter->name, name)) { + if(iter->port == port && !strcmpW(iter->name, name) && iter->is_https == is_https) { server = iter; server_addref(server); break; @@ -270,6 +270,7 @@ server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL do_create) if(server) { server->ref = 2; /* list reference and return */ server->port = port; + server->is_https = is_https; list_init(&server->conn_pool); server->name = heap_strdupW(name); if(server->name) { @@ -1725,7 +1726,7 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req if(UrlComponents.nPort == INTERNET_INVALID_PORT_NUMBER) UrlComponents.nPort = INTERNET_DEFAULT_HTTP_PORT; - new_server = get_server(UrlComponents.lpszHostName, UrlComponents.nPort, TRUE); + new_server = get_server(UrlComponents.lpszHostName, UrlComponents.nPort, UrlComponents.nScheme == INTERNET_SCHEME_HTTPS, TRUE); if(!new_server) return FALSE; @@ -3194,7 +3195,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, if(port == INTERNET_INVALID_PORT_NUMBER) port = dwFlags & INTERNET_FLAG_SECURE ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT; - request->server = get_server(session->hostName, port, TRUE); + request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE); if(!request->server) { WININET_Release(&request->hdr); return ERROR_OUTOFMEMORY; @@ -4022,7 +4023,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl) if(strcmpiW(request->server->name, hostName) || request->server->port != urlComponents.nPort) { server_t *new_server; - new_server = get_server(hostName, urlComponents.nPort, TRUE); + new_server = get_server(hostName, urlComponents.nPort, urlComponents.nScheme == INTERNET_SCHEME_HTTPS, TRUE); server_release(request->server); request->server = new_server; } diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 1877af9..d982207 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -4431,7 +4431,7 @@ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT if(url.nPort == INTERNET_INVALID_PORT_NUMBER) url.nPort = INTERNET_DEFAULT_HTTPS_PORT; - server = get_server(hostname, url.nPort, FALSE); + server = get_server(hostname, url.nPort, TRUE, FALSE); if(!server) { SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND); return FALSE; diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 1baaf2a..b932114 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -58,6 +58,7 @@ extern HMODULE WININET_hModule DECLSPEC_HIDDEN; typedef struct { WCHAR *name; INTERNET_PORT port; + BOOL is_https; struct sockaddr_storage addr; socklen_t addr_len; char addr_str[INET6_ADDRSTRLEN]; @@ -550,7 +551,7 @@ int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN; DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) DECLSPEC_HIDDEN; int sock_get_error(int) DECLSPEC_HIDDEN; -server_t *get_server(const WCHAR*,INTERNET_PORT,BOOL); +server_t *get_server(const WCHAR*,INTERNET_PORT,BOOL,BOOL); BOOL init_urlcache(void) DECLSPEC_HIDDEN; void free_urlcache(void) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : amvideo.idl: Use proper IDirectDraw forward declaration.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: d1607dbb308147abc2ac2aec0f56620d1f7e6c44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1607dbb308147abc2ac2aec0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 19 11:27:58 2012 +0100 amvideo.idl: Use proper IDirectDraw forward declaration. --- include/amvideo.idl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/amvideo.idl b/include/amvideo.idl index ad92055..f3dc45f 100644 --- a/include/amvideo.idl +++ b/include/amvideo.idl @@ -21,7 +21,7 @@ import "objidl.idl"; /* trick widl into thinking that it knows the DirectDraw types * as there is no IDL file for them (yet) */ cpp_quote("#if 0") -typedef void IDirectDraw; +interface IDirectDraw; typedef void DDSURFACEDESC,DDCAPS; typedef DWORD RGBQUAD; typedef LONGLONG REFERENCE_TIME;
1
0
0
0
Michael Stefaniuc : wintab32/tests: Remove a function pointer cast.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: d94b651519eea53a7d9a4b17e96a6b09271d680e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d94b651519eea53a7d9a4b17e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Nov 19 09:29:48 2012 +0100 wintab32/tests: Remove a function pointer cast. --- dlls/wintab32/tests/context.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wintab32/tests/context.c b/dlls/wintab32/tests/context.c index 6b37129..5f05912 100644 --- a/dlls/wintab32/tests/context.c +++ b/dlls/wintab32/tests/context.c @@ -80,7 +80,7 @@ static void wintab_create_window(HWND* pHwnd) ZeroMemory(&testWindowClass, sizeof(testWindowClass)); - testWindowClass.lpfnWndProc = (WNDPROC)wintabTestWndProc; + testWindowClass.lpfnWndProc = wintabTestWndProc; testWindowClass.hInstance = NULL; testWindowClass.hIcon = NULL; testWindowClass.hCursor = NULL;
1
0
0
0
Michael Stefaniuc : appwiz: Use the correct types for callbacks.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: 2a1a48b586a3285928869debfe93d5880c4f2a12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a1a48b586a3285928869debf…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Nov 19 09:28:43 2012 +0100 appwiz: Use the correct types for callbacks. --- dlls/appwiz.cpl/appwiz.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c index c50adf7..4f6670d 100644 --- a/dlls/appwiz.cpl/appwiz.c +++ b/dlls/appwiz.cpl/appwiz.c @@ -592,7 +592,7 @@ static void SetInfoDialogText(HKEY hKey, LPCWSTR lpKeyName, LPCWSTR lpAltMessage * lParam - additional parameter * Returns : Depends on the message */ -static BOOL CALLBACK SupportInfoDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK SupportInfoDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { APPINFO *iter; HKEY hkey; @@ -681,8 +681,7 @@ static BOOL CALLBACK SupportInfoDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR */ static void SupportInfo(HWND hWnd, int id) { - DialogBoxParamW(hInst, MAKEINTRESOURCEW(IDD_INFO), hWnd, (DLGPROC) - SupportInfoDlgProc, (LPARAM) id); + DialogBoxParamW(hInst, MAKEINTRESOURCEW(IDD_INFO), hWnd, SupportInfoDlgProc, id); } /* Definition of column headers for AddListViewColumns function */ @@ -822,7 +821,7 @@ static HIMAGELIST ResetApplicationList(BOOL bFirstRun, HWND hWnd, HIMAGELIST hIm * lParam - additional parameter * Returns : Depends on the message */ -static BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { int selitem; static HIMAGELIST hImageList; @@ -947,7 +946,7 @@ static void StartApplet(HWND hWnd) psp.hInstance = hInst; psp.u.pszTemplate = MAKEINTRESOURCEW (IDD_MAIN); psp.u2.pszIcon = NULL; - psp.pfnDlgProc = (DLGPROC) MainDlgProc; + psp.pfnDlgProc = MainDlgProc; psp.pszTitle = tab_title; psp.lParam = 0;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Add NULL pointer checks to some color context methods.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: bfed6e5f3003a3a9b33b71290e35d0b983a9e7f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfed6e5f3003a3a9b33b71290…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Nov 19 13:33:48 2012 +0800 windowscodecs: Add NULL pointer checks to some color context methods. --- dlls/windowscodecs/colorcontext.c | 8 ++++++++ dlls/windowscodecs/pngformat.c | 2 ++ dlls/windowscodecs/tests/pngformat.c | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/colorcontext.c b/dlls/windowscodecs/colorcontext.c index 5434fc6..457b4db 100644 --- a/dlls/windowscodecs/colorcontext.c +++ b/dlls/windowscodecs/colorcontext.c @@ -144,6 +144,8 @@ static HRESULT WINAPI ColorContext_GetType(IWICColorContext *iface, ColorContext *This = impl_from_IWICColorContext(iface); TRACE("(%p,%p)\n", iface, pType); + if (!pType) return E_INVALIDARG; + *pType = This->type; return S_OK; } @@ -157,6 +159,8 @@ static HRESULT WINAPI ColorContext_GetProfileBytes(IWICColorContext *iface, if (This->type != WICColorContextProfile) return WINCODEC_ERR_NOTINITIALIZED; + if (!pcbActual) return E_INVALIDARG; + if (cbBuffer >= This->profile_len && pbBuffer) memcpy(pbBuffer, This->profile, This->profile_len); @@ -171,6 +175,8 @@ static HRESULT WINAPI ColorContext_GetExifColorSpace(IWICColorContext *iface, ColorContext *This = impl_from_IWICColorContext(iface); TRACE("(%p,%p)\n", iface, pValue); + if (!pValue) return E_INVALIDARG; + *pValue = This->exif_color_space; return S_OK; } @@ -191,6 +197,8 @@ HRESULT ColorContext_Create(IWICColorContext **colorcontext) { ColorContext *This; + if (!colorcontext) return E_INVALIDARG; + This = HeapAlloc(GetProcessHeap(), 0, sizeof(ColorContext)); if (!This) return E_OUTOFMEMORY; diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 89f092e..6d6117e 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -854,6 +854,8 @@ static HRESULT WINAPI PngDecoder_Frame_GetColorContexts(IWICBitmapFrameDecode *i TRACE("(%p,%u,%p,%p)\n", iface, cCount, ppIColorContexts, pcActualCount); + if (!pcActualCount) return E_INVALIDARG; + EnterCriticalSection(&This->lock); if (ppng_get_iCCP(This->png_ptr, This->info_ptr, &name, &compression_type, &profile, &len)) diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c index b7dfbd0..3f4e855 100644 --- a/dlls/windowscodecs/tests/pngformat.c +++ b/dlls/windowscodecs/tests/pngformat.c @@ -331,6 +331,9 @@ static void test_color_contexts(void) ok(decoder != 0, "Failed to load PNG image data\n"); /* global color context */ + hr = IWICBitmapDecoder_GetColorContexts(decoder, 0, NULL, NULL); + ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetColorContexts error %#x\n", hr); + count = 0xdeadbeef; hr = IWICBitmapDecoder_GetColorContexts(decoder, 0, NULL, &count); ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetColorContexts error %#x\n", hr); @@ -340,6 +343,9 @@ static void test_color_contexts(void) hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); ok(hr == S_OK, "GetFrame error %#x\n", hr); + hr = IWICBitmapFrameDecode_GetColorContexts(frame, 0, NULL, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + count = 0xdeadbeef; hr = IWICBitmapFrameDecode_GetColorContexts(frame, 0, NULL, &count); ok(hr == S_OK, "GetColorContexts error %#x\n", hr); @@ -366,19 +372,31 @@ static void test_color_contexts(void) ok(hr == S_OK, "GetColorContexts error %#x\n", hr); ok(count == 1, "unexpected count %u\n", count); + hr = IWICImagingFactory_CreateColorContext(factory, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + hr = IWICImagingFactory_CreateColorContext(factory, &context); ok(hr == S_OK, "CreateColorContext error %#x\n", hr); + hr = IWICColorContext_GetType(context, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + type = 0xdeadbeef; hr = IWICColorContext_GetType(context, &type); ok(hr == S_OK, "GetType error %#x\n", hr); ok(type == WICColorContextUninitialized, "unexpected type %u\n", type); + hr = IWICColorContext_GetProfileBytes(context, 0, NULL, NULL); + ok(hr == WINCODEC_ERR_NOTINITIALIZED, "GetProfileBytes error %#x\n", hr); + size = 0; hr = IWICColorContext_GetProfileBytes(context, 0, NULL, &size); ok(hr == WINCODEC_ERR_NOTINITIALIZED, "GetProfileBytes error %#x\n", hr); ok(!size, "unexpected size %u\n", size); + hr = IWICColorContext_GetExifColorSpace(context, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + colorspace = 0xdeadbeef; hr = IWICColorContext_GetExifColorSpace(context, &colorspace); ok(hr == S_OK, "GetExifColorSpace error %#x\n", hr); @@ -424,6 +442,9 @@ static void test_color_contexts(void) hr = IWICBitmapFrameDecode_GetColorContexts(frame, count, &context, &count); ok(hr == S_OK, "GetColorContexts error %#x\n", hr); + hr = IWICColorContext_GetProfileBytes(context, 0, NULL, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + size = 0; hr = IWICColorContext_GetProfileBytes(context, 0, NULL, &size); ok(hr == S_OK, "GetProfileBytes error %#x\n", hr);
1
0
0
0
Dmitry Timoshkov : gdiplus: Avoid more cases of allocating a transformation matrix on the heap.
by Alexandre Julliard
19 Nov '12
19 Nov '12
Module: wine Branch: master Commit: b9ead1a7ea207bfb2492c59b50a34dcdbe22565f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9ead1a7ea207bfb2492c59b5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Nov 19 11:58:48 2012 +0800 gdiplus: Avoid more cases of allocating a transformation matrix on the heap. --- dlls/gdiplus/graphics.c | 39 +++++++++++++-------------------------- 1 files changed, 13 insertions(+), 26 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 083c115..f56682b 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1439,7 +1439,7 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s const GpCustomLineCap *custom, REAL x1, REAL y1, REAL x2, REAL y2) { HGDIOBJ oldbrush = NULL, oldpen = NULL; - GpMatrix *matrix = NULL; + GpMatrix matrix; HBRUSH brush = NULL; HPEN pen = NULL; PointF ptf[4], *custptf = NULL; @@ -1584,16 +1584,17 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s custpt = GdipAlloc(count * sizeof(POINT)); tp = GdipAlloc(count); - if(!custptf || !custpt || !tp || (GdipCreateMatrix(&matrix) != Ok)) + if(!custptf || !custpt || !tp) goto custend; memcpy(custptf, custom->pathdata.Points, count * sizeof(PointF)); - GdipScaleMatrix(matrix, size, size, MatrixOrderAppend); - GdipRotateMatrix(matrix, (180.0 / M_PI) * (theta - M_PI_2), + GdipSetMatrixElements(&matrix, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0); + GdipScaleMatrix(&matrix, size, size, MatrixOrderAppend); + GdipRotateMatrix(&matrix, (180.0 / M_PI) * (theta - M_PI_2), MatrixOrderAppend); - GdipTranslateMatrix(matrix, x2, y2, MatrixOrderAppend); - GdipTransformMatrixPoints(matrix, custptf, count); + GdipTranslateMatrix(&matrix, x2, y2, MatrixOrderAppend); + GdipTransformMatrixPoints(&matrix, custptf, count); transform_and_round_points(graphics, custpt, custptf, count); @@ -1613,7 +1614,6 @@ custend: GdipFree(custptf); GdipFree(custpt); GdipFree(tp); - GdipDeleteMatrix(matrix); break; default: break; @@ -3127,7 +3127,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image RECT dst_area; GpRect src_area; int i, x, y, src_stride, dst_stride; - GpMatrix *dst_to_src; + GpMatrix dst_to_src; REAL m11, m12, m21, m22, mdx, mdy; LPBYTE src_data, dst_data; BitmapData lockeddata; @@ -3159,22 +3159,13 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image m22 = (ptf[2].Y - ptf[0].Y) / srcheight; mdy = ptf[0].Y - m12 * srcx - m22 * srcy; - stat = GdipCreateMatrix2(m11, m12, m21, m22, mdx, mdy, &dst_to_src); - if (stat != Ok) return stat; + GdipSetMatrixElements(&dst_to_src, m11, m12, m21, m22, mdx, mdy); - stat = GdipInvertMatrix(dst_to_src); - if (stat != Ok) - { - GdipDeleteMatrix(dst_to_src); - return stat; - } + stat = GdipInvertMatrix(&dst_to_src); + if (stat != Ok) return stat; dst_data = GdipAlloc(sizeof(ARGB) * (dst_area.right - dst_area.left) * (dst_area.bottom - dst_area.top)); - if (!dst_data) - { - GdipDeleteMatrix(dst_to_src); - return OutOfMemory; - } + if (!dst_data) return OutOfMemory; dst_stride = sizeof(ARGB) * (dst_area.right - dst_area.left); @@ -3187,7 +3178,6 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image if (!src_data) { GdipFree(dst_data); - GdipDeleteMatrix(dst_to_src); return OutOfMemory; } src_stride = sizeof(ARGB) * src_area.Width; @@ -3210,7 +3200,6 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image if (src_data != dst_data) GdipFree(src_data); GdipFree(dst_data); - GdipDeleteMatrix(dst_to_src); return stat; } @@ -3219,7 +3208,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image src_stride, ColorAdjustTypeBitmap); /* Transform the bits as needed to the destination. */ - GdipTransformMatrixPoints(dst_to_src, dst_to_src_points, 3); + GdipTransformMatrixPoints(&dst_to_src, dst_to_src_points, 3); x_dx = dst_to_src_points[1].X - dst_to_src_points[0].X; x_dy = dst_to_src_points[1].Y - dst_to_src_points[0].Y; @@ -3246,8 +3235,6 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image } } - GdipDeleteMatrix(dst_to_src); - GdipFree(src_data); stat = alpha_blend_pixels(graphics, dst_area.left, dst_area.top,
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200