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
December 2013
----- 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
3 participants
462 discussions
Start a n
N
ew thread
Nikolay Sivov : include: Added IQueryCancelAutoPlay definition.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 6fa197f5374cc9c61d52f5b6d0fb67348659327c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6fa197f5374cc9c61d52f5b6d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 31 13:12:48 2013 +0400 include: Added IQueryCancelAutoPlay definition. --- include/shobjidl.idl | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/include/shobjidl.idl b/include/shobjidl.idl index e129371..8fe87b7 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -3308,6 +3308,19 @@ interface ICustomDestinationList : IUnknown HRESULT AbortList(); } +[ + uuid(ddefe873-6997-4e68-be26-39b633adbe12), + object, + pointer_default(unique) +] +interface IQueryCancelAutoPlay : IUnknown +{ + HRESULT AllowAutoPlay([in, string] LPCWSTR path, + [in] DWORD content_type, + [in, string] LPCWSTR label, + [in] DWORD serial_number); +} + /***************************************************************************** * ShellObjects typelibrary */ @@ -3396,4 +3409,12 @@ library ShellObjects { interface IEnumObjects; } + + [ + uuid(331f1768-05a9-4ddd-b86e-dae34ddc998a) + ] + coclass QueryCancelAutoPlay + { + interface IQueryCancelAutoPlay; + } }
1
0
0
0
Nikolay Sivov : ole32: Call moniker methods with proper wrappers.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: f041c2c5549e6a24c73004180d29fe327b058441 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f041c2c5549e6a24c73004180…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 31 13:12:21 2013 +0400 ole32: Call moniker methods with proper wrappers. --- dlls/ole32/classmoniker.c | 35 +++++++++++++---------------------- 1 files changed, 13 insertions(+), 22 deletions(-) diff --git a/dlls/ole32/classmoniker.c b/dlls/ole32/classmoniker.c index 0c7e751..89c7297 100644 --- a/dlls/ole32/classmoniker.c +++ b/dlls/ole32/classmoniker.c @@ -119,20 +119,6 @@ static ULONG WINAPI ClassMoniker_AddRef(IMoniker* iface) } /****************************************************************************** - * ClassMoniker_Destroy (local function) - *******************************************************************************/ -static HRESULT ClassMoniker_Destroy(ClassMoniker* This) -{ - TRACE("(%p)\n",This); - - if (This->pMarshal) IUnknown_Release(This->pMarshal); - - HeapFree(GetProcessHeap(),0,This); - - return S_OK; -} - -/****************************************************************************** * ClassMoniker_Release ******************************************************************************/ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface) @@ -145,7 +131,11 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface) ref = InterlockedDecrement(&This->ref); /* destroy the object if there are no more references to it */ - if (ref == 0) ClassMoniker_Destroy(This); + if (ref == 0) + { + if (This->pMarshal) IUnknown_Release(This->pMarshal); + HeapFree(GetProcessHeap(),0,This); + } return ref; } @@ -277,7 +267,7 @@ static HRESULT WINAPI ClassMoniker_BindToStorage(IMoniker* iface, VOID** ppvResult) { TRACE("(%p,%p,%p,%p)\n",pbc, pmkToLeft, riid, ppvResult); - return ClassMoniker_BindToObject(iface, pbc, pmkToLeft, riid, ppvResult); + return IMoniker_BindToObject(iface, pbc, pmkToLeft, riid, ppvResult); } /****************************************************************************** @@ -294,7 +284,7 @@ static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface, if (!ppmkReduced) return E_POINTER; - ClassMoniker_AddRef(iface); + IMoniker_AddRef(iface); *ppmkReduced = iface; @@ -600,7 +590,7 @@ static HRESULT WINAPI ClassMonikerROTData_QueryInterface(IROTData *iface,REFIID TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); - return ClassMoniker_QueryInterface(&This->IMoniker_iface, riid, ppvObject); + return IMoniker_QueryInterface(&This->IMoniker_iface, riid, ppvObject); } /*********************************************************************** @@ -612,7 +602,7 @@ static ULONG WINAPI ClassMonikerROTData_AddRef(IROTData *iface) TRACE("(%p)\n",iface); - return ClassMoniker_AddRef(&This->IMoniker_iface); + return IMoniker_AddRef(&This->IMoniker_iface); } /*********************************************************************** @@ -624,7 +614,7 @@ static ULONG WINAPI ClassMonikerROTData_Release(IROTData* iface) TRACE("(%p)\n",iface); - return ClassMoniker_Release(&This->IMoniker_iface); + return IMoniker_Release(&This->IMoniker_iface); } /****************************************************************************** @@ -874,9 +864,10 @@ static const IClassFactoryVtbl ClassMonikerCFVtbl = ClassMonikerCF_CreateInstance, ClassMonikerCF_LockServer }; -static const IClassFactoryVtbl *ClassMonikerCF = &ClassMonikerCFVtbl; + +static IClassFactory ClassMonikerCF = { &ClassMonikerCFVtbl }; HRESULT ClassMonikerCF_Create(REFIID riid, LPVOID *ppv) { - return IClassFactory_QueryInterface((IClassFactory *)&ClassMonikerCF, riid, ppv); + return IClassFactory_QueryInterface(&ClassMonikerCF, riid, ppv); }
1
0
0
0
Frédéric Delanoy : wininet/tests: Constify some character strings.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 0e7e87875ca480057cb8d35ff6832a7c3b93dc5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e7e87875ca480057cb8d35ff…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Dec 31 03:00:47 2013 +0100 wininet/tests: Constify some character strings. --- dlls/wininet/tests/http.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 951460f..2f9c36c 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2330,13 +2330,13 @@ static void test_proxy_direct(int port) DWORD r, sz, error; char buffer[0x40], *url; WCHAR bufferW[0x40]; + static const char url_fmt[] = "
http://test.winehq.org:%u/test2
"; static CHAR username[] = "mike", password[] = "1101", - useragent[] = "winetest", - url_fmt[] = "
http://test.winehq.org:%u/test2
"; - static WCHAR usernameW[] = {'m','i','k','e',0}, - passwordW[] = {'1','1','0','1',0}, - useragentW[] = {'w','i','n','e','t','e','s','t',0}; + useragent[] = "winetest"; + static const WCHAR usernameW[] = {'m','i','k','e',0}, + passwordW[] = {'1','1','0','1',0}, + useragentW[] = {'w','i','n','e','t','e','s','t',0}; /* specify proxy type without the proxy and bypass */ SetLastError(0xdeadbeef); @@ -2675,8 +2675,8 @@ done: static void test_header_handling_order(int port) { - static char authorization[] = "Authorization: Basic dXNlcjpwd2Q="; - static char connection[] = "Connection: Close"; + static const char authorization[] = "Authorization: Basic dXNlcjpwd2Q="; + static const char connection[] = "Connection: Close"; static const char *types[2] = { "*", NULL }; HINTERNET session, connect, request;
1
0
0
0
Frédéric Delanoy : winhttp/tests: Constify a character string.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: e7f8e9e81d7777f38d987626dd2707b293020b9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7f8e9e81d7777f38d987626d…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Dec 31 03:00:46 2013 +0100 winhttp/tests: Constify a character string. --- dlls/winhttp/tests/winhttp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index e073e6a..255eb09 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -292,7 +292,7 @@ static void test_SendRequest (void) static const WCHAR test_file[] = {'/','p','o','s','t','t','e','s','t','.','p','h','p',0}; static const WCHAR test_verb[] = {'P','O','S','T',0}; static CHAR post_data[] = "mode=Test"; - static CHAR test_post[] = "mode => Test\\0\n"; + static const char test_post[] = "mode => Test\\0\n"; header_len = -1L; total_len = optional_len = sizeof(post_data);
1
0
0
0
Frédéric Delanoy : version/tests: Constify some character strings.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: b1fd27eb2d4ad9aa4ae50167ce10ae920e7857fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1fd27eb2d4ad9aa4ae50167c…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Dec 31 03:00:45 2013 +0100 version/tests: Constify some character strings. --- dlls/version/tests/info.c | 2 +- dlls/version/tests/install.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index aa1982c..e66c9ee 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -204,7 +204,7 @@ static void test_info(void) VS_FIXEDFILEINFO *pFixedVersionInfo; UINT uiLength; char VersionString[MAX_PATH]; - static CHAR backslash[] = "\\"; + static const char backslash[] = "\\"; DWORDLONG dwlVersion; hdl = 0x55555555; diff --git a/dlls/version/tests/install.c b/dlls/version/tests/install.c index 6faeaba..9b84dce 100644 --- a/dlls/version/tests/install.c +++ b/dlls/version/tests/install.c @@ -34,9 +34,9 @@ static void test_find_file(void) char filename[MAX_PATH]; char outBuf[MAX_PATH]; char windir[MAX_PATH]; - static CHAR empty[] = "", - regedit[] = "regedit", - regedit_exe[] = "regedit.exe"; + static const char empty[] = "", + regedit[] = "regedit", + regedit_exe[] = "regedit.exe"; memset(appdir, 0, MAX_PATH); memset(windir, 0, MAX_PATH);
1
0
0
0
Frédéric Delanoy : user32/tests: Constify some character strings.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 5e94a5d4c9c6d40c2bb939d5925c8def613bddfc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e94a5d4c9c6d40c2bb939d59…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Dec 31 03:00:44 2013 +0100 user32/tests: Constify some character strings. --- dlls/user32/tests/dde.c | 14 +++++++------- dlls/user32/tests/static.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index 4a50c39..3824081 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -2397,8 +2397,8 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV char str[MAX_PATH]; static int msg_index = 0; static HCONV conversation = 0; - static char test_service [] = "TestDDEService"; - static char test_topic [] = "TestDDETopic"; + static const char test_service [] = "TestDDEService"; + static const char test_topic [] = "TestDDETopic"; msg_index++; @@ -2586,10 +2586,10 @@ static void test_end_to_end_client(BOOL type_a) HSZ server, topic; HCONV hconv; HDDEDATA hdata; - static char test_service[] = "TestDDEService"; - static WCHAR test_service_w[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0}; - static char test_topic[] = "TestDDETopic"; - static WCHAR test_topic_w[] = {'T','e','s','t','D','D','E','T','o','p','i','c',0}; + static const char test_service[] = "TestDDEService"; + static const WCHAR test_service_w[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0}; + static const char test_topic[] = "TestDDETopic"; + static const WCHAR test_topic_w[] = {'T','e','s','t','D','D','E','T','o','p','i','c',0}; trace("Start end to end client %s\n", type_a ? "ASCII" : "UNICODE"); @@ -2651,7 +2651,7 @@ static void test_end_to_end_server(HANDLE hproc, HANDLE hthread, BOOL type_a) BOOL ret; DWORD res; HDDEDATA hdata; - static CHAR test_service[] = "TestDDEService"; + static const char test_service[] = "TestDDEService"; trace("start end to end server %s\n", type_a ? "ASCII" : "UNICODE"); server_pid = 0; diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c index 51d2bc3..d4aa9b1 100644 --- a/dlls/user32/tests/static.c +++ b/dlls/user32/tests/static.c @@ -119,7 +119,7 @@ static void test_updates(int style, int flags) START_TEST(static) { - static char szClassName[] = "testclass"; + static const char szClassName[] = "testclass"; WNDCLASSEXA wndclass; wndclass.cbSize = sizeof(wndclass);
1
0
0
0
Frédéric Delanoy : urlmon/tests: Constify some character strings.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: e4c76bb3ca024b8596aa57802a8dc1c58ed6a650 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4c76bb3ca024b8596aa57802…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Dec 31 03:00:43 2013 +0100 urlmon/tests: Constify some character strings. --- dlls/urlmon/tests/protocol.c | 2 +- dlls/urlmon/tests/url.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index 7ba375b..25f78d0 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -1819,7 +1819,7 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, case 1: { IServiceProvider *service_provider; IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; + static const WCHAR header[] = {'?',0}; hres = IInternetProtocolSink_QueryInterface(binding_sink, &IID_IServiceProvider, (void**)&service_provider); diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 8fae051..83c5c8d 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -967,7 +967,7 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, case 1: { IServiceProvider *service_provider; IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; + static const WCHAR header[] = {'?',0}; hres = IInternetProtocolSink_QueryInterface(protocol_sink, &IID_IServiceProvider, (void**)&service_provider);
1
0
0
0
Bruno Jesus : ws2_32: Cope with invalid hints in getaddrinfo/GetAddrInfoW.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 719715c77426c7cb759a012d24f898622db5db6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=719715c77426c7cb759a012d2…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Mon Dec 30 23:45:07 2013 -0200 ws2_32: Cope with invalid hints in getaddrinfo/GetAddrInfoW. --- dlls/ws2_32/socket.c | 46 +++++++++++---- dlls/ws2_32/tests/sock.c | 142 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 171 insertions(+), 17 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=719715c77426c7cb759a0…
1
0
0
0
Bruno Jesus : ws2_32: Add extended IPX protocol support.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 3eb39dc08e67cb33bd6dadbbe14af46dd8673ead URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3eb39dc08e67cb33bd6dadbbe…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Mon Dec 30 22:25:09 2013 -0200 ws2_32: Add extended IPX protocol support. --- dlls/ws2_32/socket.c | 36 ++++++++++++++++++++--- dlls/ws2_32/tests/sock.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 5 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 732bbad..462ff86 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -201,6 +201,8 @@ static const INT valid_protocols[] = 0 }; +#define IS_IPX_PROTO(X) ((X) >= WS_NSPROTO_IPX && (X) <= WS_NSPROTO_IPX + 255) + #if defined(IP_UNICAST_IF) && defined(SO_ATTACH_FILTER) # define LINUX_BOUND_IF struct interface_filter { @@ -1122,6 +1124,11 @@ convert_proto_w2u(int windowsproto) { for (i=0;i<sizeof(ws_proto_map)/sizeof(ws_proto_map[0]);i++) if (ws_proto_map[i][0] == windowsproto) return ws_proto_map[i][1]; + + /* check for extended IPX */ + if (IS_IPX_PROTO(windowsproto)) + return windowsproto; + FIXME("unhandled Windows socket protocol %d\n", windowsproto); return -1; } @@ -1133,6 +1140,12 @@ convert_proto_u2w(int unixproto) { for (i=0;i<sizeof(ws_proto_map)/sizeof(ws_proto_map[0]);i++) if (ws_proto_map[i][1] == unixproto) return ws_proto_map[i][0]; + + /* if value is inside IPX range just return it - the kernel simply + * echoes the value used in the socket() function */ + if (IS_IPX_PROTO(unixproto)) + return unixproto; + FIXME("unhandled UNIX socket protocol %d\n", unixproto); return -1; } @@ -5976,7 +5989,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, { SOCKET ret; DWORD err; - int unixaf, unixtype; + int unixaf, unixtype, ipxptype = -1; /* FIXME: The "advanced" parameters of WSASocketW (lpProtocolInfo, @@ -6011,13 +6024,16 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, if (!type && (af || protocol)) { + int autoproto = protocol; WSAPROTOCOL_INFOW infow; /* default to the first valid protocol */ - if (!protocol) - protocol = valid_protocols[0]; + if (!autoproto) + autoproto = valid_protocols[0]; + else if(IS_IPX_PROTO(autoproto)) + autoproto = WS_NSPROTO_IPX; - if (WS_EnterSingleProtocolW(protocol, &infow)) + if (WS_EnterSingleProtocolW(autoproto, &infow)) { type = infow.iSocketType; @@ -6028,6 +6044,14 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, } } + /* + Windows has an extension to the IPX protocol that allows to create sockets + and set the IPX packet type at the same time, to do that a caller will use + a protocol like NSPROTO_IPX + <PACKET TYPE> + */ + if (IS_IPX_PROTO(protocol)) + ipxptype = protocol - WS_NSPROTO_IPX; + /* convert the socket family, type and protocol */ unixaf = convert_af_w2u(af); unixtype = convert_socktype_w2u(type); @@ -6083,7 +6107,9 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, if (ret) { TRACE("\tcreated %04lx\n", ret ); - return ret; + if (ipxptype > 0) + set_ipx_packettype(ret, ipxptype); + return ret; } err = GetLastError(); diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 7bb39f7..59c356c 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -26,6 +26,8 @@ #include <windows.h> #include <winternl.h> #include <ws2tcpip.h> +#include <wsipx.h> +#include <wsnwlink.h> #include <mswsock.h> #include <mstcpip.h> #include <stdio.h> @@ -2088,6 +2090,73 @@ static void test_WSASocket(void) SOCK_RAW, socktype); closesocket(sock); } + + /* IPX socket tests */ + + SetLastError(0xdeadbeef); + sock = WSASocketA(AF_IPX, SOCK_DGRAM, NSPROTO_IPX, NULL, 0, 0); + if (sock == INVALID_SOCKET) + { + err = WSAGetLastError(); + ok(err == WSAEAFNOSUPPORT || broken(err == WSAEPROTONOSUPPORT), "Expected 10047, received %d\n", err); + skip("IPX is not supported\n"); + } + else + { + WSAPROTOCOL_INFOA info; + closesocket(sock); + + trace("IPX is supported\n"); + + sock = WSASocketA(0, 0, NSPROTO_IPX, NULL, 0, 0); + ok(sock != INVALID_SOCKET, "Failed to create socket: %d\n", + WSAGetLastError()); + + size = sizeof(socktype); + socktype = 0xdead; + err = getsockopt(sock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size); + ok(!err,"getsockopt failed with %d\n", WSAGetLastError()); + ok(socktype == SOCK_DGRAM, "Wrong socket type, expected %d received %d\n", + SOCK_DGRAM, socktype); + + /* check socket family, type and protocol */ + size = sizeof(WSAPROTOCOL_INFOA); + err = getsockopt(sock, SOL_SOCKET, SO_PROTOCOL_INFOA, (char *) &info, &size); + ok(!err,"getsockopt failed with %d\n", WSAGetLastError()); + ok(info.iProtocol == NSPROTO_IPX, "expected protocol %d, received %d\n", + NSPROTO_IPX, info.iProtocol); + ok(info.iAddressFamily == AF_IPX, "expected family %d, received %d\n", + AF_IPX, info.iProtocol); + ok(info.iSocketType == SOCK_DGRAM, "expected type %d, received %d\n", + SOCK_DGRAM, info.iSocketType); + closesocket(sock); + + /* SOCK_STREAM does not support NSPROTO_IPX */ + SetLastError(0xdeadbeef); + ok(WSASocketA(AF_IPX, SOCK_STREAM, NSPROTO_IPX, NULL, 0, 0) == INVALID_SOCKET, + "WSASocketA should have failed\n"); + err = WSAGetLastError(); + ok(err == WSAEPROTONOSUPPORT, "Expected 10043, received %d\n", err); + + /* test extended IPX support - that is adding any number between 0 and 255 + * to the IPX protocol value will make it be used as IPX packet type */ + for(i = 0;i <= 255;i += 17) + { + SetLastError(0xdeadbeef); + sock = WSASocketA(0, 0, NSPROTO_IPX + i, NULL, 0, 0); + ok(sock != INVALID_SOCKET, "Failed to create socket: %d\n", + WSAGetLastError()); + + size = sizeof(int); + socktype = -1; + err = getsockopt(sock, NSPROTO_IPX, IPX_PTYPE, (char *) &socktype, &size); + ok(!err, "getsockopt failed with %d\n", WSAGetLastError()); + ok(socktype == i, "Wrong IPX packet type, expected %d received %d\n", + i, socktype); + + closesocket(sock); + } + } } static void test_WSADuplicateSocket(void)
1
0
0
0
Bruno Jesus : ws2_32: Use a helper function to set the IPX packet type.
by Alexandre Julliard
31 Dec '13
31 Dec '13
Module: wine Branch: master Commit: 2d4adfc49eba7028a4038369c7a639de7a2f6f77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d4adfc49eba7028a4038369c…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Mon Dec 30 22:24:56 2013 -0200 ws2_32: Use a helper function to set the IPX packet type. --- dlls/ws2_32/socket.c | 53 +++++++++++++++++++++++++++++-------------------- 1 files changed, 31 insertions(+), 22 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 0d6838e..732bbad 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1159,6 +1159,36 @@ convert_socktype_u2w(int unixsocktype) { return -1; } +static int set_ipx_packettype(int sock, int ptype) +{ +#ifdef HAS_IPX + int fd = get_sock_fd( sock, 0, NULL ), ret = 0; + TRACE("trying to set IPX_PTYPE: %d (fd: %d)\n", ptype, fd); + + /* We try to set the ipx type on ipx socket level. */ +#ifdef SOL_IPX + if(setsockopt(fd, SOL_IPX, IPX_TYPE, &ptype, sizeof(ptype)) == -1) + { + ERR("IPX: could not set ipx option type; expect weird behaviour\n"); + ret = SOCKET_ERROR; + } +#else + { + struct ipx val; + /* Should we retrieve val using a getsockopt call and then + * set the modified one? */ + val.ipx_pt = ptype; + setsockopt(fd, 0, SO_DEFAULT_HEADERS, &val, sizeof(struct ipx)); + } +#endif + release_sock_fd( sock, fd ); + return ret; +#else + WARN("IPX support is not enabled, can't set packet type\n"); + return SOCKET_ERROR; +#endif +} + /* ----------------------------------- API ----- * * Init / cleanup / error checking. @@ -4772,28 +4802,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, switch(optname) { case IPX_PTYPE: - fd = get_sock_fd( s, 0, NULL ); - TRACE("trying to set IPX_PTYPE: %d (fd: %d)\n", *(const int*)optval, fd); - - /* We try to set the ipx type on ipx socket level. */ -#ifdef SOL_IPX - if(setsockopt(fd, SOL_IPX, IPX_TYPE, optval, optlen) == -1) - { - ERR("IPX: could not set ipx option type; expect weird behaviour\n"); - release_sock_fd( s, fd ); - return SOCKET_ERROR; - } -#else - { - struct ipx val; - /* Should we retrieve val using a getsockopt call and then - * set the modified one? */ - val.ipx_pt = *optval; - setsockopt(fd, 0, SO_DEFAULT_HEADERS, &val, sizeof(struct ipx)); - } -#endif - release_sock_fd( s, fd ); - return 0; + return set_ipx_packettype(s, *(int*)optval); case IPX_FILTERPTYPE: /* Sets the receive filter packet type, at the moment we don't support it */
1
0
0
0
← Newer
1
2
3
4
5
...
47
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
Results per page:
10
25
50
100
200