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
January 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
972 discussions
Start a n
N
ew thread
Michael Stefaniuc : dsound: Merge IDirectSound3DListener into the primary buffer object.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 37df4671cb7acc214fd1e5bb5f2fc4ecb0015a48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37df4671cb7acc214fd1e5bb5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Jan 16 00:13:31 2012 +0100 dsound: Merge IDirectSound3DListener into the primary buffer object. --- dlls/dsound/dsound_private.h | 22 +---- dlls/dsound/primary.c | 36 +++++-- dlls/dsound/sound3d.c | 236 +++++++++++++++--------------------------- 3 files changed, 111 insertions(+), 183 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=37df4671cb7acc214fd1e…
1
0
0
0
Michael Stefaniuc : dsound: Get rid of some LPDIRECTSOUNDBUFFER usage.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 044edbb62599f8fcea12d9ac6bae1e855303cb26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=044edbb62599f8fcea12d9ac6…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Jan 16 00:12:14 2012 +0100 dsound: Get rid of some LPDIRECTSOUNDBUFFER usage. --- dlls/dsound/primary.c | 112 +++++++++++++++++++++--------------------------- 1 files changed, 49 insertions(+), 63 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=044edbb62599f8fcea12d…
1
0
0
0
Nikolay Sivov : msxml3: Remove no longer used node data type helper.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: df434065d33933ebceec966b46bdca0147e2bdac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df434065d33933ebceec966b4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 16 00:47:46 2012 +0300 msxml3: Remove no longer used node data type helper. --- dlls/msxml3/node.c | 206 ---------------------------------------------------- 1 files changed, 0 insertions(+), 206 deletions(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 290019e..adc38cb 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -65,30 +65,6 @@ MAKE_FUNCPTR(xsltParseStylesheetDoc); # undef MAKE_FUNCPTR #endif -/* TODO: get rid of these and use the enum */ -static const WCHAR szBinBase64[] = {'b','i','n','.','b','a','s','e','6','4',0}; -static const WCHAR szString[] = {'s','t','r','i','n','g',0}; -static const WCHAR szNumber[] = {'n','u','m','b','e','r',0}; -static const WCHAR szInt[] = {'I','n','t',0}; -static const WCHAR szFixed[] = {'F','i','x','e','d','.','1','4','.','4',0}; -static const WCHAR szBoolean[] = {'B','o','o','l','e','a','n',0}; -static const WCHAR szDateTime[] = {'d','a','t','e','T','i','m','e',0}; -static const WCHAR szDateTimeTZ[] = {'d','a','t','e','T','i','m','e','.','t','z',0}; -static const WCHAR szDate[] = {'D','a','t','e',0}; -static const WCHAR szTime[] = {'T','i','m','e',0}; -static const WCHAR szTimeTZ[] = {'T','i','m','e','.','t','z',0}; -static const WCHAR szI1[] = {'i','1',0}; -static const WCHAR szI2[] = {'i','2',0}; -static const WCHAR szI4[] = {'i','4',0}; -static const WCHAR szIU1[] = {'u','i','1',0}; -static const WCHAR szIU2[] = {'u','i','2',0}; -static const WCHAR szIU4[] = {'u','i','4',0}; -static const WCHAR szR4[] = {'r','4',0}; -static const WCHAR szR8[] = {'r','8',0}; -static const WCHAR szFloat[] = {'f','l','o','a','t',0}; -static const WCHAR szUUID[] = {'u','u','i','d',0}; -static const WCHAR szBinHex[] = {'b','i','n','.','h','e','x',0}; - static const IID IID_xmlnode = {0x4f2f4ba2,0xb822,0x11df,{0x8b,0x8a,0x68,0x50,0xdf,0xd7,0x20,0x85}}; xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type ) @@ -767,188 +743,6 @@ HRESULT node_put_text(xmlnode *This, BSTR text) return S_OK; } -static inline BYTE hex_to_byte(xmlChar c) -{ - if(c <= '9') return c-'0'; - if(c <= 'F') return c-'A'+10; - return c-'a'+10; -} - -static inline BYTE base64_to_byte(xmlChar c) -{ - if(c == '+') return 62; - if(c == '/') return 63; - if(c <= '9') return c-'0'+52; - if(c <= 'Z') return c-'A'; - return c-'a'+26; -} - -/* TODO: phasing this version out */ -static inline HRESULT VARIANT_from_xmlChar(xmlChar *str, VARIANT *v, BSTR type) -{ - if(!type || !lstrcmpiW(type, szString) || - !lstrcmpiW(type, szNumber) || !lstrcmpiW(type, szUUID)) - { - V_VT(v) = VT_BSTR; - V_BSTR(v) = bstr_from_xmlChar(str); - - if(!V_BSTR(v)) - return E_OUTOFMEMORY; - } - else if(!lstrcmpiW(type, szDateTime) || !lstrcmpiW(type, szDateTimeTZ) || - !lstrcmpiW(type, szDate) || !lstrcmpiW(type, szTime) || - !lstrcmpiW(type, szTimeTZ)) - { - VARIANT src; - WCHAR *p, *e; - SYSTEMTIME st; - DOUBLE date = 0.0; - - st.wYear = 1899; - st.wMonth = 12; - st.wDay = 30; - st.wDayOfWeek = st.wHour = st.wMinute = st.wSecond = st.wMilliseconds = 0; - - V_VT(&src) = VT_BSTR; - V_BSTR(&src) = bstr_from_xmlChar(str); - - if(!V_BSTR(&src)) - return E_OUTOFMEMORY; - - p = V_BSTR(&src); - e = p + SysStringLen(V_BSTR(&src)); - - if(p+4<e && *(p+4)=='-') /* parse date (yyyy-mm-dd) */ - { - st.wYear = atoiW(p); - st.wMonth = atoiW(p+5); - st.wDay = atoiW(p+8); - p += 10; - - if(*p == 'T') p++; - } - - if(p+2<e && *(p+2)==':') /* parse time (hh:mm:ss.?) */ - { - st.wHour = atoiW(p); - st.wMinute = atoiW(p+3); - st.wSecond = atoiW(p+6); - p += 8; - - if(*p == '.') - { - p++; - while(isdigitW(*p)) p++; - } - } - - SystemTimeToVariantTime(&st, &date); - V_VT(v) = VT_DATE; - V_DATE(v) = date; - - if(*p == '+') /* parse timezone offset (+hh:mm) */ - V_DATE(v) += (DOUBLE)atoiW(p+1)/24 + (DOUBLE)atoiW(p+4)/1440; - else if(*p == '-') /* parse timezone offset (-hh:mm) */ - V_DATE(v) -= (DOUBLE)atoiW(p+1)/24 + (DOUBLE)atoiW(p+4)/1440; - - VariantClear(&src); - } - else if(!lstrcmpiW(type, szBinHex)) - { - SAFEARRAYBOUND sab; - int i, len; - - len = xmlStrlen(str)/2; - sab.lLbound = 0; - sab.cElements = len; - - V_VT(v) = (VT_ARRAY|VT_UI1); - V_ARRAY(v) = SafeArrayCreate(VT_UI1, 1, &sab); - - if(!V_ARRAY(v)) - return E_OUTOFMEMORY; - - for(i=0; i<len; i++) - ((BYTE*)V_ARRAY(v)->pvData)[i] = (hex_to_byte(str[2*i])<<4) - + hex_to_byte(str[2*i+1]); - } - else if(!lstrcmpiW(type, szBinBase64)) - { - SAFEARRAYBOUND sab; - int i, len; - - len = xmlStrlen(str); - if(str[len-2] == '=') i = 2; - else if(str[len-1] == '=') i = 1; - else i = 0; - - sab.lLbound = 0; - sab.cElements = len/4*3-i; - - V_VT(v) = (VT_ARRAY|VT_UI1); - V_ARRAY(v) = SafeArrayCreate(VT_UI1, 1, &sab); - - if(!V_ARRAY(v)) - return E_OUTOFMEMORY; - - for(i=0; i<len/4; i++) - { - ((BYTE*)V_ARRAY(v)->pvData)[3*i] = (base64_to_byte(str[4*i])<<2) - + (base64_to_byte(str[4*i+1])>>4); - if(3*i+1 < sab.cElements) - ((BYTE*)V_ARRAY(v)->pvData)[3*i+1] = (base64_to_byte(str[4*i+1])<<4) - + (base64_to_byte(str[4*i+2])>>2); - if(3*i+2 < sab.cElements) - ((BYTE*)V_ARRAY(v)->pvData)[3*i+2] = (base64_to_byte(str[4*i+2])<<6) - + base64_to_byte(str[4*i+3]); - } - } - else - { - VARIANT src; - HRESULT hres; - - if(!lstrcmpiW(type, szInt) || !lstrcmpiW(type, szI4)) - V_VT(v) = VT_I4; - else if(!lstrcmpiW(type, szFixed)) - V_VT(v) = VT_CY; - else if(!lstrcmpiW(type, szBoolean)) - V_VT(v) = VT_BOOL; - else if(!lstrcmpiW(type, szI1)) - V_VT(v) = VT_I1; - else if(!lstrcmpiW(type, szI2)) - V_VT(v) = VT_I2; - else if(!lstrcmpiW(type, szIU1)) - V_VT(v) = VT_UI1; - else if(!lstrcmpiW(type, szIU2)) - V_VT(v) = VT_UI2; - else if(!lstrcmpiW(type, szIU4)) - V_VT(v) = VT_UI4; - else if(!lstrcmpiW(type, szR4)) - V_VT(v) = VT_R4; - else if(!lstrcmpiW(type, szR8) || !lstrcmpiW(type, szFloat)) - V_VT(v) = VT_R8; - else - { - FIXME("Type handling not yet implemented\n"); - V_VT(v) = VT_BSTR; - } - - V_VT(&src) = VT_BSTR; - V_BSTR(&src) = bstr_from_xmlChar(str); - - if(!V_BSTR(&src)) - return E_OUTOFMEMORY; - - hres = VariantChangeTypeEx(v, &src, MAKELCID(MAKELANGID( - LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT),0, V_VT(v)); - VariantClear(&src); - return hres; - } - - return S_OK; -} - BSTR EnsureCorrectEOL(BSTR sInput) { int nNum = 0;
1
0
0
0
Nikolay Sivov : msxml3: Fix allocated length for header list element.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 05ea6855bffbfa5e9a5a11c1dc94ca398205d6bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05ea6855bffbfa5e9a5a11c1d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 16 00:38:16 2012 +0300 msxml3: Fix allocated length for header list element. --- dlls/msxml3/httprequest.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c index ff4ab21..f2e8b5e 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -502,7 +502,7 @@ static void add_response_header(httprequest *This, const WCHAR *data, int len) /* new header */ TRACE("got header %s:%s\n", debugstr_w(header), debugstr_w(value)); - entry = heap_alloc(sizeof(*header)); + entry = heap_alloc(sizeof(*entry)); entry->header = header; entry->value = value; list_add_head(&This->respheaders, &entry->entry);
1
0
0
0
Francois Gouget : dbghelp: Fix the position where the calling convention is specified in function pointers .
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 67448e566176dadc53091da304c89d8c29093f6a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67448e566176dadc53091da30…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jan 15 21:09:02 2012 +0100 dbghelp: Fix the position where the calling convention is specified in function pointers. --- dlls/dbghelp/symbol.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 6c5aebf..ac1824b 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -1853,7 +1853,7 @@ DWORD WINAPI UnDecorateSymbolName(PCSTR DecoratedName, PSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags) { /* undocumented from msvcrt */ - static char* (* CDECL p_undname)(char*, const char*, int, void* (* CDECL)(size_t), void (* CDECL)(void*), unsigned short); + static char* (CDECL *p_undname)(char*, const char*, int, void* (CDECL*)(size_t), void (CDECL*)(void*), unsigned short); static const WCHAR szMsvcrt[] = {'m','s','v','c','r','t','.','d','l','l',0}; TRACE("(%s, %p, %d, 0x%08x)\n",
1
0
0
0
Francois Gouget : windowscodecs: Fix compilation on systems that don' t support nameless unions.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 259153001f2cfe548eb2c18614865a7a8e602ee1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=259153001f2cfe548eb2c1861…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jan 15 21:08:06 2012 +0100 windowscodecs: Fix compilation on systems that don't support nameless unions. --- dlls/windowscodecs/metadatahandler.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index 23854d8..114c3af 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -21,6 +21,7 @@ #include <stdarg.h> #define COBJMACROS +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" @@ -567,8 +568,8 @@ static HRESULT LoadUnknownMetadata(IStream *input, const GUID *preferred_vendor, PropVariantInit(&result[0].value); result[0].value.vt = VT_BLOB; - result[0].value.blob.cbSize = bytesread; - result[0].value.blob.pBlobData = data; + result[0].value.u.blob.cbSize = bytesread; + result[0].value.u.blob.pBlobData = data; *items = result; *item_count = 1;
1
0
0
0
Hans Leidekker : wininet: Add support for setting and retrieving the send/ receive timeouts.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 6522393265e547c4a2711b83be07dc7988a50fc8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6522393265e547c4a2711b83b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Jan 13 15:15:48 2012 +0100 wininet: Add support for setting and retrieving the send/receive timeouts. --- dlls/wininet/http.c | 63 ++++++++++++++++++++++++++++++++---------- dlls/wininet/internet.h | 6 +++- dlls/wininet/netconnection.c | 17 +++++++---- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ca8cc60..3439924 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2182,26 +2182,19 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, return ERROR_SUCCESS; } case INTERNET_OPTION_CONNECT_TIMEOUT: - if (size != sizeof(DWORD)) - return ERROR_INVALID_PARAMETER; - + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; req->connect_timeout = *(DWORD *)buffer; return ERROR_SUCCESS; case INTERNET_OPTION_SEND_TIMEOUT: - case INTERNET_OPTION_RECEIVE_TIMEOUT: - TRACE("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT\n"); - - if (size != sizeof(DWORD)) - return ERROR_INVALID_PARAMETER; - - if(!req->netconn) { - FIXME("unsupported without active connection\n"); - return ERROR_SUCCESS; - } + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; + req->send_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; - return NETCON_set_timeout(req->netconn, option == INTERNET_OPTION_SEND_TIMEOUT, - *(DWORD*)buffer); + case INTERNET_OPTION_RECEIVE_TIMEOUT: + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; + req->receive_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; case INTERNET_OPTION_USERNAME: heap_free(req->session->userName); @@ -3063,6 +3056,8 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl; request->data_stream = &request->netconn_stream.data_stream; request->connect_timeout = session->connect_timeout; + request->send_timeout = session->send_timeout; + request->receive_timeout = session->receive_timeout; InitializeCriticalSection( &request->read_section ); request->read_section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": http_request_t.read_section"); @@ -3970,6 +3965,7 @@ static DWORD HTTP_SecureProxyConnect(http_request_t *request) TRACE("full request -> %s\n", debugstr_an( ascii_req, len ) ); + NETCON_set_timeout( request->netconn, TRUE, request->send_timeout ); res = NETCON_send( request->netconn, ascii_req, len, 0, &cnt ); heap_free( ascii_req ); if (res != ERROR_SUCCESS) @@ -4798,6 +4794,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); + NETCON_set_timeout( request->netconn, TRUE, request->send_timeout ); res = NETCON_send(request->netconn, ascii_req, len, 0, &cnt); heap_free( ascii_req ); if(res != ERROR_SUCCESS) { @@ -5473,6 +5470,26 @@ static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *b *size = sizeof(DWORD); *(DWORD *)buffer = ses->connect_timeout; return ERROR_SUCCESS; + + case INTERNET_OPTION_SEND_TIMEOUT: + TRACE("INTERNET_OPTION_SEND_TIMEOUT\n"); + + if (*size < sizeof(DWORD)) + return ERROR_INSUFFICIENT_BUFFER; + + *size = sizeof(DWORD); + *(DWORD *)buffer = ses->send_timeout; + return ERROR_SUCCESS; + + case INTERNET_OPTION_RECEIVE_TIMEOUT: + TRACE("INTERNET_OPTION_RECEIVE_TIMEOUT\n"); + + if (*size < sizeof(DWORD)) + return ERROR_INSUFFICIENT_BUFFER; + + *size = sizeof(DWORD); + *(DWORD *)buffer = ses->receive_timeout; + return ERROR_SUCCESS; } return INET_QueryOption(hdr, option, buffer, size, unicode); @@ -5497,9 +5514,22 @@ static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buf } case INTERNET_OPTION_CONNECT_TIMEOUT: { + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; ses->connect_timeout = *(DWORD *)buffer; return ERROR_SUCCESS; } + case INTERNET_OPTION_SEND_TIMEOUT: + { + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; + ses->send_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; + } + case INTERNET_OPTION_RECEIVE_TIMEOUT: + { + if (!buffer || size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; + ses->receive_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; + } default: break; } @@ -5573,6 +5603,8 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, session->serverPort = serverPort; session->hostPort = serverPort; session->connect_timeout = INFINITE; + session->send_timeout = INFINITE; + session->receive_timeout = INFINITE; /* Don't send a handle created callback if this handle was created with InternetOpenUrl */ if (!(session->hdr.dwInternalFlags & INET_OPENURL)) @@ -5645,6 +5677,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) if(!request->netconn) goto lend; + NETCON_set_timeout( request->netconn, FALSE, request->receive_timeout ); do { static const WCHAR szHundred[] = {'1','0','0',0}; /* diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 41af08c..3af93db 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -266,6 +266,8 @@ typedef struct INTERNET_PORT hostPort; /* the final destination port of the request */ INTERNET_PORT serverPort; /* the port of the server we directly connect to */ DWORD connect_timeout; + DWORD send_timeout; + DWORD receive_timeout; } http_session_t; #define HDR_ISREQUEST 0x0001 @@ -307,6 +309,8 @@ typedef struct netconn_t *netconn; DWORD security_flags; DWORD connect_timeout; + DWORD send_timeout; + DWORD receive_timeout; LPWSTR version; LPWSTR statusText; DWORD bytesToWrite; @@ -529,7 +533,7 @@ BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available) DECLSP BOOL NETCON_is_alive(netconn_t*) DECLSPEC_HIDDEN; LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN; int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN; -DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, int value) DECLSPEC_HIDDEN; +DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) DECLSPEC_HIDDEN; int sock_get_error(int) DECLSPEC_HIDDEN; extern void URLCacheContainers_CreateDefaults(void) DECLSPEC_HIDDEN; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 8273c73..870b317 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -927,24 +927,29 @@ int NETCON_GetCipherStrength(netconn_t *connection) #endif } -DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, int value) +DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) { int result; struct timeval tv; /* value is in milliseconds, convert to struct timeval */ - tv.tv_sec = value / 1000; - tv.tv_usec = (value % 1000) * 1000; - + if (value == INFINITE) + { + tv.tv_sec = 0; + tv.tv_usec = 0; + } + else + { + tv.tv_sec = value / 1000; + tv.tv_usec = (value % 1000) * 1000; + } result = setsockopt(connection->socketFD, SOL_SOCKET, send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv, sizeof(tv)); - if (result == -1) { WARN("setsockopt failed (%s)\n", strerror(errno)); return sock_get_error(errno); } - return ERROR_SUCCESS; }
1
0
0
0
Hans Leidekker : wininet: Add support for setting and retrieving the connect timeout.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 848cd8a2f553a7b809dd8e8dabf5262210a7db0a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=848cd8a2f553a7b809dd8e8da…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Jan 13 15:15:20 2012 +0100 wininet: Add support for setting and retrieving the connect timeout. --- dlls/wininet/http.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index e645d86..ca8cc60 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2151,6 +2151,13 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe return ERROR_SUCCESS; } } + case INTERNET_OPTION_CONNECT_TIMEOUT: + if (*size < sizeof(DWORD)) + return ERROR_INSUFFICIENT_BUFFER; + + *size = sizeof(DWORD); + *(DWORD *)buffer = req->connect_timeout; + return ERROR_SUCCESS; } return INET_QueryOption(hdr, option, buffer, size, unicode); @@ -2174,6 +2181,13 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, req->netconn->security_flags = flags; return ERROR_SUCCESS; } + case INTERNET_OPTION_CONNECT_TIMEOUT: + if (size != sizeof(DWORD)) + return ERROR_INVALID_PARAMETER; + + req->connect_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; + case INTERNET_OPTION_SEND_TIMEOUT: case INTERNET_OPTION_RECEIVE_TIMEOUT: TRACE("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT\n"); @@ -5438,6 +5452,8 @@ static void HTTPSESSION_Destroy(object_header_t *hdr) static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) { + http_session_t *ses = (http_session_t *)hdr; + switch(option) { case INTERNET_OPTION_HANDLE_TYPE: TRACE("INTERNET_OPTION_HANDLE_TYPE\n"); @@ -5448,6 +5464,15 @@ static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *b *size = sizeof(DWORD); *(DWORD*)buffer = INTERNET_HANDLE_TYPE_CONNECT_HTTP; return ERROR_SUCCESS; + case INTERNET_OPTION_CONNECT_TIMEOUT: + TRACE("INTERNET_OPTION_CONNECT_TIMEOUT\n"); + + if (*size < sizeof(DWORD)) + return ERROR_INSUFFICIENT_BUFFER; + + *size = sizeof(DWORD); + *(DWORD *)buffer = ses->connect_timeout; + return ERROR_SUCCESS; } return INET_QueryOption(hdr, option, buffer, size, unicode); @@ -5470,6 +5495,11 @@ static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buf if (!(ses->password = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; return ERROR_SUCCESS; } + case INTERNET_OPTION_CONNECT_TIMEOUT: + { + ses->connect_timeout = *(DWORD *)buffer; + return ERROR_SUCCESS; + } default: break; }
1
0
0
0
Hans Leidekker : wininet: Implement the connect timeout.
by Alexandre Julliard
16 Jan '12
16 Jan '12
Module: wine Branch: master Commit: 72273a07863ab330cf9aa628928e46fdb800cd5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72273a07863ab330cf9aa6289…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Jan 13 15:15:04 2012 +0100 wininet: Implement the connect timeout. --- dlls/wininet/http.c | 4 +++- dlls/wininet/internet.h | 4 +++- dlls/wininet/netconnection.c | 32 +++++++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 8fc01fe..e645d86 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3048,6 +3048,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl; request->data_stream = &request->netconn_stream.data_stream; + request->connect_timeout = session->connect_timeout; InitializeCriticalSection( &request->read_section ); request->read_section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": http_request_t.read_section"); @@ -4597,7 +4598,7 @@ static DWORD open_http_connection(http_request_t *request, BOOL *reusing) server->addr_str, strlen(server->addr_str)+1); - res = create_netconn(is_https, server, request->security_flags, &netconn); + res = create_netconn(is_https, server, request->security_flags, request->connect_timeout, &netconn); server_release(server); if(res != ERROR_SUCCESS) { ERR("create_netconn failed: %u\n", res); @@ -5541,6 +5542,7 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, session->password = heap_strdupW(lpszPassword); session->serverPort = serverPort; session->hostPort = serverPort; + session->connect_timeout = INFINITE; /* Don't send a handle created callback if this handle was created with InternetOpenUrl */ if (!(session->hdr.dwInternalFlags & INET_OPENURL)) diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index a7af629..41af08c 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -265,6 +265,7 @@ typedef struct LPWSTR password; INTERNET_PORT hostPort; /* the final destination port of the request */ INTERNET_PORT serverPort; /* the port of the server we directly connect to */ + DWORD connect_timeout; } http_session_t; #define HDR_ISREQUEST 0x0001 @@ -305,6 +306,7 @@ typedef struct LPWSTR rawHeaders; netconn_t *netconn; DWORD security_flags; + DWORD connect_timeout; LPWSTR version; LPWSTR statusText; DWORD bytesToWrite; @@ -515,7 +517,7 @@ VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundProxy, DWORD *foundProxyLen) DECLSPEC_HIDDEN; -DWORD create_netconn(BOOL,server_t*,DWORD,netconn_t**) DECLSPEC_HIDDEN; +DWORD create_netconn(BOOL, server_t *, DWORD, DWORD, netconn_t **) DECLSPEC_HIDDEN; void free_netconn(netconn_t*) DECLSPEC_HIDDEN; void NETCON_unload(void) DECLSPEC_HIDDEN; DWORD NETCON_secure_connect(netconn_t *connection, LPWSTR hostname) DECLSPEC_HIDDEN; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index bf93301..8273c73 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -497,7 +497,7 @@ static DWORD init_openssl(void) #endif } -DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netconn_t **ret) +DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, DWORD timeout, netconn_t **ret) { netconn_t *netconn; int result, flag; @@ -526,9 +526,39 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netcon assert(server->addr_len); result = netconn->socketFD = socket(server->addr.ss_family, SOCK_STREAM, 0); if(result != -1) { + flag = 1; + ioctlsocket(netconn->socketFD, FIONBIO, &flag); result = connect(netconn->socketFD, (struct sockaddr*)&server->addr, server->addr_len); if(result == -1) + { + if (sock_get_error(errno) == WSAEINPROGRESS) { + struct pollfd pfd; + int res; + + pfd.fd = netconn->socketFD; + pfd.events = POLLOUT; + res = poll(&pfd, 1, timeout); + if (!res) + { + closesocket(netconn->socketFD); + heap_free(netconn); + return ERROR_INTERNET_CANNOT_CONNECT; + } + else if (res > 0) + { + int err; + socklen_t len = sizeof(err); + if (!getsockopt(netconn->socketFD, SOL_SOCKET, SO_ERROR, &err, &len) && !err) + result = 0; + } + } + } + if(result == -1) closesocket(netconn->socketFD); + else { + flag = 0; + ioctlsocket(netconn->socketFD, FIONBIO, &flag); + } } if(result == -1) { heap_free(netconn);
1
0
0
0
Jeremy Newman : Merge branch 'master' of winehq.org:/home/winehq/opt/source /git/website
by Jeremy Newman
16 Jan '12
16 Jan '12
Module: website Branch: master Commit: d1e1be8e364c94f915f78cdc3a903294e95b92fa URL:
http://source.winehq.org/git/website.git/?a=commit;h=d1e1be8e364c94f915f78c…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Mon Jan 16 09:13:27 2012 -0600 Merge branch 'master' of winehq.org:/home/winehq/opt/source/git/website ---
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
98
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Results per page:
10
25
50
100
200