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
July 2017
----- 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
632 discussions
Start a n
N
ew thread
Owen Rudge : wsdapi: Implement WSDXMLGetValueFromAny.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 760190b524ab5c0e6f6804ed195ff8e626d6aa53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=760190b524ab5c0e6f6804ed1…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Jun 28 22:13:26 2017 +0100 wsdapi: Implement WSDXMLGetValueFromAny. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/wsdapi.spec | 2 +- dlls/wsdapi/xml.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/wsdutil.h | 1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dlls/wsdapi/wsdapi.spec b/dlls/wsdapi/wsdapi.spec index 41d62bb..22457c9 100644 --- a/dlls/wsdapi/wsdapi.spec +++ b/dlls/wsdapi/wsdapi.spec @@ -42,4 +42,4 @@ @ stdcall WSDXMLCleanupElement(ptr) @ stdcall WSDXMLCreateContext(ptr) @ stub WSDXMLGetNameFromBuiltinNamespace -@ stub WSDXMLGetValueFromAny +@ stdcall WSDXMLGetValueFromAny(wstr wstr ptr wstr) diff --git a/dlls/wsdapi/xml.c b/dlls/wsdapi/xml.c index 71e9661..145c394 100644 --- a/dlls/wsdapi/xml.c +++ b/dlls/wsdapi/xml.c @@ -238,6 +238,46 @@ HRESULT WINAPI WSDXMLCleanupElement(WSDXML_ELEMENT *pAny) return S_OK; } +HRESULT WINAPI WSDXMLGetValueFromAny(const WCHAR *pszNamespace, const WCHAR *pszName, WSDXML_ELEMENT *pAny, LPCWSTR *ppszValue) +{ + WSDXML_ELEMENT *element; + WSDXML_TEXT *text; + + if (pAny == NULL) + return E_INVALIDARG; + + if (ppszValue == NULL) + return E_POINTER; + + if ((pszNamespace == NULL) || (pszName == NULL) || (lstrlenW(pszNamespace) > WSD_MAX_TEXT_LENGTH) || (lstrlenW(pszName) > WSD_MAX_TEXT_LENGTH)) + return E_INVALIDARG; + + element = pAny; + + while (element != NULL) + { + if (element->Node.Type == ElementType) + { + if ((lstrcmpW(element->Name->LocalName, pszName) == 0) && (lstrcmpW(element->Name->Space->Uri, pszNamespace) == 0)) + { + if ((element->FirstChild == NULL) || (element->FirstChild->Type != TextType)) + { + return E_FAIL; + } + + text = (WSDXML_TEXT *) element->FirstChild; + *ppszValue = (LPCWSTR) text->Text; + + return S_OK; + } + } + + element = (WSDXML_ELEMENT *) element->Node.Next; + } + + return E_FAIL; +} + /* IWSDXMLContext implementation */ struct xmlNamespace diff --git a/include/wsdutil.h b/include/wsdutil.h index 2980d40..402a413 100644 --- a/include/wsdutil.h +++ b/include/wsdutil.h @@ -28,5 +28,6 @@ HRESULT WINAPI WSDXMLAddChild(WSDXML_ELEMENT *pParent, WSDXML_ELEMENT *pChild); HRESULT WINAPI WSDXMLAddSibling(WSDXML_ELEMENT *pFirst, WSDXML_ELEMENT *pSecond); HRESULT WINAPI WSDXMLBuildAnyForSingleElement(WSDXML_NAME *pElementName, LPCWSTR pszText, WSDXML_ELEMENT **ppAny); HRESULT WINAPI WSDXMLCleanupElement(WSDXML_ELEMENT *pAny); +HRESULT WINAPI WSDXMLGetValueFromAny(const WCHAR *pszNamespace, const WCHAR *pszName, WSDXML_ELEMENT *pAny, LPCWSTR *ppszValue); #endif
1
0
0
0
Owen Rudge : wsdapi: Implement IWSDUdpAddress_Get/SetSockAddr.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: db94c52719bd2d3a802b587ae76b4ab6b241f2b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db94c52719bd2d3a802b587ae…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Jun 28 22:13:23 2017 +0100 wsdapi: Implement IWSDUdpAddress_Get/SetSockAddr. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/address.c | 33 ++++++++++++++++++++++++++---- dlls/wsdapi/tests/address.c | 50 ++++++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=db94c52719bd2d3a802b5…
1
0
0
0
Owen Rudge : wsdapi: Implement IWSDUdpAddress_Get/SetMessageType.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: b724f0b2e37176e8f52bac3896a4703eaf161afd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b724f0b2e37176e8f52bac389…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Jun 28 22:13:21 2017 +0100 wsdapi: Implement IWSDUdpAddress_Get/SetMessageType. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/address.c | 22 ++++++++++++++++++---- dlls/wsdapi/tests/address.c | 14 +++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/dlls/wsdapi/address.c b/dlls/wsdapi/address.c index f225930..69d4956 100644 --- a/dlls/wsdapi/address.c +++ b/dlls/wsdapi/address.c @@ -38,6 +38,7 @@ typedef struct IWSDUdpAddressImpl { WCHAR ipv4Address[25]; WCHAR ipv6Address[64]; WORD port; + WSDUdpMessageType messageType; } IWSDUdpAddressImpl; static inline IWSDUdpAddressImpl *impl_from_IWSDUdpAddress(IWSDUdpAddress *iface) @@ -247,14 +248,27 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetExclusive(IWSDUdpAddress *This) static HRESULT WINAPI IWSDUdpAddressImpl_SetMessageType(IWSDUdpAddress *This, WSDUdpMessageType messageType) { - FIXME("(%p, %d)\n", This, messageType); - return E_NOTIMPL; + IWSDUdpAddressImpl *impl = impl_from_IWSDUdpAddress(This); + + TRACE("(%p, %d)\n", This, messageType); + + impl->messageType = messageType; + return S_OK; } static HRESULT WINAPI IWSDUdpAddressImpl_GetMessageType(IWSDUdpAddress *This, WSDUdpMessageType *pMessageType) { - FIXME("(%p, %p)\n", This, pMessageType); - return E_NOTIMPL; + IWSDUdpAddressImpl *impl = impl_from_IWSDUdpAddress(This); + + TRACE("(%p, %p)\n", This, pMessageType); + + if (pMessageType == NULL) + { + return E_POINTER; + } + + *pMessageType = impl->messageType; + return S_OK; } static HRESULT WINAPI IWSDUdpAddressImpl_SetTTL(IWSDUdpAddress *This, DWORD dwTTL) diff --git a/dlls/wsdapi/tests/address.c b/dlls/wsdapi/tests/address.c index 1a18f02..0a2824a 100644 --- a/dlls/wsdapi/tests/address.c +++ b/dlls/wsdapi/tests/address.c @@ -210,26 +210,26 @@ static void GetSetMessageType_udp_tests(void) ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n"); rc = IWSDUdpAddress_GetMessageType(udpAddress, NULL); - todo_wine ok(rc == E_POINTER, "GetMessageType returned unexpected result: %08x\n", rc); + ok(rc == E_POINTER, "GetMessageType returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType); - todo_wine ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); ok(actualMessageType == 0, "GetMessageType returned unexpected message type: %d\n", actualMessageType); /* Try setting a message type */ rc = IWSDUdpAddress_SetMessageType(udpAddress, expectedMessageType1); - todo_wine ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType); - todo_wine ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); - todo_wine ok(actualMessageType == expectedMessageType1, "GetMessageType returned unexpected message type: %d\n", actualMessageType); + ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); + ok(actualMessageType == expectedMessageType1, "GetMessageType returned unexpected message type: %d\n", actualMessageType); /* Set another one */ rc = IWSDUdpAddress_SetMessageType(udpAddress, expectedMessageType2); - todo_wine ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "SetMessageType returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetMessageType(udpAddress, &actualMessageType); - todo_wine ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetMessageType returned unexpected result: %08x\n", rc); ok(actualMessageType == expectedMessageType2, "GetMessageType returned unexpected message type: %d\n", actualMessageType); /* Release the object */
1
0
0
0
Owen Rudge : wsdapi: Implement IWSDUdpAddress_Get/SetPort.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 52ad4d0e6624041ccc8c13504e4d8480fc92ff9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52ad4d0e6624041ccc8c13504…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Jun 28 22:13:18 2017 +0100 wsdapi: Implement IWSDUdpAddress_Get/SetPort. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/address.c | 22 ++++++++++++++++++---- dlls/wsdapi/tests/address.c | 22 +++++++++++----------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/dlls/wsdapi/address.c b/dlls/wsdapi/address.c index 05c4bb9..f225930 100644 --- a/dlls/wsdapi/address.c +++ b/dlls/wsdapi/address.c @@ -37,6 +37,7 @@ typedef struct IWSDUdpAddressImpl { SOCKADDR_STORAGE sockAddr; WCHAR ipv4Address[25]; WCHAR ipv6Address[64]; + WORD port; } IWSDUdpAddressImpl; static inline IWSDUdpAddressImpl *impl_from_IWSDUdpAddress(IWSDUdpAddress *iface) @@ -113,14 +114,27 @@ static HRESULT WINAPI IWSDUdpAddressImpl_Deserialize(IWSDUdpAddress *This, LPCWS static HRESULT WINAPI IWSDUdpAddressImpl_GetPort(IWSDUdpAddress *This, WORD *pwPort) { - FIXME("(%p, %p)\n", This, pwPort); - return E_NOTIMPL; + IWSDUdpAddressImpl *impl = impl_from_IWSDUdpAddress(This); + + TRACE("(%p, %p)\n", This, pwPort); + + if (pwPort == NULL) + { + return E_POINTER; + } + + *pwPort = impl->port; + return S_OK; } static HRESULT WINAPI IWSDUdpAddressImpl_SetPort(IWSDUdpAddress *This, WORD wPort) { - FIXME("(%p, %d)\n", This, wPort); - return E_NOTIMPL; + IWSDUdpAddressImpl *impl = impl_from_IWSDUdpAddress(This); + + TRACE("(%p, %d)\n", This, wPort); + + impl->port = wPort; + return S_OK; } static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *This, BOOL fSafe, LPCWSTR *ppszAddress) diff --git a/dlls/wsdapi/tests/address.c b/dlls/wsdapi/tests/address.c index 2142045..1a18f02 100644 --- a/dlls/wsdapi/tests/address.c +++ b/dlls/wsdapi/tests/address.c @@ -164,32 +164,32 @@ static void GetSetPort_udp_tests(void) /* No test for GetPort(NULL) as this causes an access violation exception on Windows */ rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); ok(actualPort == 0, "GetPort returned unexpected port: %d\n", actualPort); /* Try setting a zero port */ rc = IWSDUdpAddress_SetPort(udpAddress, 0); - todo_wine ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); ok(actualPort == 0, "GetPort returned unexpected port: %d\n", actualPort); /* Set a real port */ rc = IWSDUdpAddress_SetPort(udpAddress, expectedPort1); - todo_wine ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); - todo_wine ok(actualPort == expectedPort1, "GetPort returned unexpected port: %d\n", actualPort); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(actualPort == expectedPort1, "GetPort returned unexpected port: %d\n", actualPort); /* Now set a different port */ rc = IWSDUdpAddress_SetPort(udpAddress, expectedPort2); - todo_wine ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "SetPort returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetPort(udpAddress, &actualPort); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); - todo_wine ok(actualPort == expectedPort2, "GetPort returned unexpected port: %d\n", actualPort); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(actualPort == expectedPort2, "GetPort returned unexpected port: %d\n", actualPort); /* Release the object */ ret = IWSDUdpAddress_Release(udpAddress); @@ -330,7 +330,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetPort doesn't return the port set via the socket */ rc = IWSDUdpAddress_GetPort(udpAddress, &port); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); ok(port == 0, "GetPort returned unexpected port: %d\n", port); /* Try setting an IPv4 address without a port */ @@ -370,7 +370,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetPort doesn't return the port set via the socket */ rc = IWSDUdpAddress_GetPort(udpAddress, &port); - todo_wine ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetPort returned unexpected result: %08x\n", rc); ok(port == 0, "GetPort returned unexpected port: %d\n", port); /* Try setting an IPv6 address without a port */
1
0
0
0
Owen Rudge : wsdapi: Implement IWSDUdpAddress_GetTransportAddress[Ex].
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: d140cd504ab7d0c0d3e9a07668138a9bec80df28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d140cd504ab7d0c0d3e9a0766…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Jun 28 22:13:15 2017 +0100 wsdapi: Implement IWSDUdpAddress_GetTransportAddress[Ex]. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/address.c | 57 ++++++++++++++++++++++++++++++++++++++++----- dlls/wsdapi/tests/address.c | 28 +++++++++++----------- 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/dlls/wsdapi/address.c b/dlls/wsdapi/address.c index 587d090..05c4bb9 100644 --- a/dlls/wsdapi/address.c +++ b/dlls/wsdapi/address.c @@ -35,6 +35,8 @@ typedef struct IWSDUdpAddressImpl { IWSDUdpAddress IWSDUdpAddress_iface; LONG ref; SOCKADDR_STORAGE sockAddr; + WCHAR ipv4Address[25]; + WCHAR ipv6Address[64]; } IWSDUdpAddressImpl; static inline IWSDUdpAddressImpl *impl_from_IWSDUdpAddress(IWSDUdpAddress *iface) @@ -121,16 +123,59 @@ static HRESULT WINAPI IWSDUdpAddressImpl_SetPort(IWSDUdpAddress *This, WORD wPor return E_NOTIMPL; } -static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddress(IWSDUdpAddress *This, LPCWSTR *ppszAddress) +static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *This, BOOL fSafe, LPCWSTR *ppszAddress) { - FIXME("(%p, %p)\n", This, ppszAddress); - return E_NOTIMPL; + IWSDUdpAddressImpl *impl = impl_from_IWSDUdpAddress(This); + SOCKADDR_STORAGE storage; + DWORD size; + + TRACE("(%p, %d, %p)\n", This, fSafe, ppszAddress); + + if (ppszAddress == NULL) + return E_POINTER; + + *ppszAddress = NULL; + + switch (((SOCKADDR_IN *) &impl->sockAddr)->sin_family) + { + case AF_INET: + size = sizeof(impl->ipv4Address) / sizeof(WCHAR); + + if (WSAAddressToStringW((LPSOCKADDR) &impl->sockAddr, sizeof(SOCKADDR_IN), NULL, impl->ipv4Address, &size) == 0) + { + *ppszAddress = impl->ipv4Address; + return S_OK; + } + + break; + + case AF_INET6: + size = sizeof(impl->ipv6Address) / sizeof(WCHAR); + + /* Copy the SOCKADDR structure so we can remove the scope ID if not required */ + memcpy(&storage, &impl->sockAddr, sizeof(SOCKADDR_IN6)); + + if (!fSafe) + ((SOCKADDR_IN6 *) &storage)->sin6_scope_id = 0; + + if (WSAAddressToStringW((LPSOCKADDR) &storage, sizeof(SOCKADDR_IN6), NULL, impl->ipv6Address, &size) == 0) + { + *ppszAddress = impl->ipv6Address; + return S_OK; + } + + break; + + default: + return S_OK; + } + + return HRESULT_FROM_WIN32(WSAGetLastError()); } -static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *This, BOOL fSafe, LPCWSTR *ppszAddress) +static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddress(IWSDUdpAddress *This, LPCWSTR *ppszAddress) { - FIXME("(%p, %d, %p)\n", This, fSafe, ppszAddress); - return E_NOTIMPL; + return IWSDUdpAddressImpl_GetTransportAddressEx(This, FALSE, ppszAddress); } static HRESULT WINAPI IWSDUdpAddressImpl_SetTransportAddress(IWSDUdpAddress *This, LPCWSTR pszAddress) diff --git a/dlls/wsdapi/tests/address.c b/dlls/wsdapi/tests/address.c index b26a3b9..2142045 100644 --- a/dlls/wsdapi/tests/address.c +++ b/dlls/wsdapi/tests/address.c @@ -95,7 +95,7 @@ static void GetSetTransportAddress_udp_tests(void) ok(udpAddress != NULL, "WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL\n"); rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); + ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); ok(returnedAddress == NULL, "GetTransportAddress returned unexpected address: %08x\n", rc); /* Try setting a null address */ @@ -111,12 +111,12 @@ static void GetSetTransportAddress_udp_tests(void) ok(rc == S_OK, "SetTransportAddress(ipv4Address) failed: %08x\n", rc); rc = IWSDUdpAddress_GetTransportAddress(udpAddress, NULL); - todo_wine ok(rc == E_POINTER, "GetTransportAddress(NULL) returned unexpected result: %08x\n", rc); + ok(rc == E_POINTER, "GetTransportAddress(NULL) returned unexpected result: %08x\n", rc); rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); - todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); - todo_wine ok(lstrcmpW(returnedAddress, ipv4Address) == 0, "Returned address != ipv4Address (%s)\n", wine_dbgstr_w(returnedAddress)); + ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); + ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); + ok(lstrcmpW(returnedAddress, ipv4Address) == 0, "Returned address != ipv4Address (%s)\n", wine_dbgstr_w(returnedAddress)); /* Try setting an IPv4 address with a port number */ rc = IWSDUdpAddress_SetTransportAddress(udpAddress, ipv4AddressWithPort); @@ -127,17 +127,17 @@ static void GetSetTransportAddress_udp_tests(void) ok(rc == S_OK, "SetTransportAddress(ipv6Address) failed: %08x\n", rc); rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); - todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); - todo_wine ok(lstrcmpW(returnedAddress, ipv6Address) == 0, "Returned address != ipv6Address (%s)\n", wine_dbgstr_w(returnedAddress)); + ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); + ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); + ok(lstrcmpW(returnedAddress, ipv6Address) == 0, "Returned address != ipv6Address (%s)\n", wine_dbgstr_w(returnedAddress)); /* Try setting an IPv6 address with a port number */ rc = IWSDUdpAddress_SetTransportAddress(udpAddress, ipv6AddressWithPort); ok(rc == S_OK, "SetTransportAddress(ipv6AddressWithPort) failed: %08x\n", rc); rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); - todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); + ok(rc == S_OK, "GetTransportAddress returned unexpected result: %08x\n", rc); + ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: '%s'\n", wine_dbgstr_w(returnedAddress)); todo_wine ok(lstrcmpW(returnedAddress, ipv6AddressWithPort) == 0, "Returned address != ipv6AddressWithPort (%s)\n", wine_dbgstr_w(returnedAddress)); /* Release the object */ @@ -324,7 +324,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetTransportAddress returns the address set via the socket */ rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); + ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress); todo_wine ok(lstrcmpW(returnedAddress, expectedIpv4TransportAddr) == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress)); @@ -341,7 +341,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetTransportAddress returns the address set via the socket */ rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); + ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress); todo_wine ok(lstrcmpW(returnedAddress, expectedIpv4TransportAddrNoPort) == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress)); @@ -364,7 +364,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetTransportAddress returns the address set via the socket */ rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); + ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress); todo_wine ok(lstrcmpW(returnedAddress, expectedIpv6TransportAddr) == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress)); @@ -381,7 +381,7 @@ static void GetSetSockaddr_udp_tests(void) /* Check that GetTransportAddress returns the address set via the socket */ rc = IWSDUdpAddress_GetTransportAddress(udpAddress, &returnedAddress); - todo_wine ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); + ok(rc == S_OK, "GetTransportAddress failed: %08x\n", rc); todo_wine ok(returnedAddress != NULL, "GetTransportAddress returned unexpected address: %p\n", returnedAddress); todo_wine ok(lstrcmpW(returnedAddress, expectedIpv6TransportAddrNoPort) == 0, "GetTransportAddress returned unexpected address: %s\n", wine_dbgstr_w(returnedAddress));
1
0
0
0
Akihiro Sagawa : ntdll/tests: Add more tests if we have real VM counters.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 7c06d99e83b1df153d307332def29c299ebe2eb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c06d99e83b1df153d307332d…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Mon Jul 3 23:24:35 2017 +0900 ntdll/tests: Add more tests if we have real VM counters. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/info.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index f1de206..e90e4a7 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1069,6 +1069,9 @@ static void test_query_process_vm(void) VM_COUNTERS pvi; ULONG old_size = FIELD_OFFSET(VM_COUNTERS,PrivatePageCount); HANDLE process; + SIZE_T prev_size; + const SIZE_T alloc_size = 16 * 1024 * 1024; + void *ptr; status = pNtQueryInformationProcess(NULL, ProcessVmCounters, NULL, sizeof(pvi), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, @@ -1119,6 +1122,47 @@ static void test_query_process_vm(void) ok( pvi.PagefileUsage > 0, "Expected a PagefileUsage > 0\n"); CloseHandle(process); + + /* Check if we have real counters */ + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), NULL); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + prev_size = pvi.VirtualSize; + if (winetest_debug > 1) + dump_vm_counters("VM counters before VirtualAlloc", &pvi); + ptr = VirtualAlloc(NULL, alloc_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + ok( ptr != NULL, "VirtualAlloc failed, err %u\n", GetLastError()); + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), NULL); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + if (winetest_debug > 1) + dump_vm_counters("VM counters after VirtualAlloc", &pvi); + todo_wine ok( pvi.VirtualSize >= prev_size + alloc_size, + "Expected to be greater than %lu, got %lu\n", prev_size + alloc_size, pvi.VirtualSize); + VirtualFree( ptr, 0, MEM_RELEASE); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), NULL); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + prev_size = pvi.VirtualSize; + if (winetest_debug > 1) + dump_vm_counters("VM counters before VirtualAlloc", &pvi); + ptr = VirtualAlloc(NULL, alloc_size, MEM_RESERVE, PAGE_READWRITE); + ok( ptr != NULL, "VirtualAlloc failed, err %u\n", GetLastError()); + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), NULL); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + if (winetest_debug > 1) + dump_vm_counters("VM counters after VirtualAlloc(MEM_RESERVE)", &pvi); + todo_wine ok( pvi.VirtualSize >= prev_size + alloc_size, + "Expected to be greater than %lu, got %lu\n", prev_size + alloc_size, pvi.VirtualSize); + prev_size = pvi.VirtualSize; + + ptr = VirtualAlloc(ptr, alloc_size, MEM_COMMIT, PAGE_READWRITE); + ok( ptr != NULL, "VirtualAlloc failed, err %u\n", GetLastError()); + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), NULL); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + if (winetest_debug > 1) + dump_vm_counters("VM counters after VirtualAlloc(MEM_COMMIT)", &pvi); + ok( pvi.VirtualSize == prev_size, + "Expected to equal to %lu, got %lu\n", prev_size, pvi.VirtualSize); + VirtualFree( ptr, 0, MEM_RELEASE); } static void test_query_process_io(void)
1
0
0
0
Akihiro Sagawa : tools: Support multiple error name tokens in a line.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 4fbabc2add38e710ec7bddf2287cc5da85dadf0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4fbabc2add38e710ec7bddf22…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Mon Jul 3 23:24:33 2017 +0900 tools: Support multiple error name tokens in a line. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/trace.c | 1 + tools/make_requests | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/trace.c b/server/trace.c index 962b122..7a4b4b2 100644 --- a/server/trace.c +++ b/server/trace.c @@ -5429,6 +5429,7 @@ static const struct { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD }, { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB }, { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING }, + { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB }, { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG }, { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED }, { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION }, diff --git a/tools/make_requests b/tools/make_requests index d99793c..3a81f36 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -290,11 +290,11 @@ sub GET_ERROR_NAMES() open FILE, $f or die "Can't open $f"; while (<FILE>) { - if (/STATUS_(\w+)/) + while (/\bSTATUS_(\w+)/g) { $errors{$1} = "STATUS_$1" unless ($1 eq "SUCCESS" || $1 eq "WAIT_0"); } - elsif (/set_win32_error\s*\(\s*(\w+)\s*\)/) + while (/\bset_win32_error\s*\(\s*(\w+)\s*\)/g) { $errors{$1} = "0xc0010000 | $1"; }
1
0
0
0
Akihiro Sagawa : tools: Also ignore STATUS_WAIT_0.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: c8faa1925c144ecb3874197e57a3addb5f685351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8faa1925c144ecb3874197e5…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Mon Jul 3 23:24:31 2017 +0900 tools: Also ignore STATUS_WAIT_0. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/make_requests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make_requests b/tools/make_requests index 6e4a537..d99793c 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -292,7 +292,7 @@ sub GET_ERROR_NAMES() { if (/STATUS_(\w+)/) { - $errors{$1} = "STATUS_$1" unless $1 eq "SUCCESS"; + $errors{$1} = "STATUS_$1" unless ($1 eq "SUCCESS" || $1 eq "WAIT_0"); } elsif (/set_win32_error\s*\(\s*(\w+)\s*\)/) {
1
0
0
0
Nikolay Sivov : iphlpapi: Fix GetIfTable() trace message.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 9eaf99174e5cd8c6fd639a00e4188fe5a4cba6b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9eaf99174e5cd8c6fd639a00e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jul 3 15:01:19 2017 +0300 iphlpapi: Fix GetIfTable() trace message. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/iphlpapi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index d0e13e4..94bf825 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1800,8 +1800,8 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder) { DWORD ret; - TRACE("pIfTable %p, pdwSize %p, bOrder %d\n", pdwSize, pdwSize, - (DWORD)bOrder); + TRACE("pIfTable %p, pdwSize %p, bOrder %d\n", pIfTable, pdwSize, bOrder); + if (!pdwSize) ret = ERROR_INVALID_PARAMETER; else {
1
0
0
0
Jacek Caban : server: Keep ifchange queue through sock object life time.
by Alexandre Julliard
03 Jul '17
03 Jul '17
Module: wine Branch: master Commit: 37804f1ec5f82581e504b2cd23b09f4fc0a7f2e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37804f1ec5f82581e504b2cd2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jun 30 15:08:09 2017 +0200 server: Keep ifchange queue through sock object life time. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/sock.c | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/server/sock.c b/server/sock.c index d4af01e..75b3db5 100644 --- a/server/sock.c +++ b/server/sock.c @@ -123,8 +123,8 @@ static void sock_dump( struct object *obj, int verbose ); static int sock_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *sock_get_fd( struct object *obj ); static void sock_destroy( struct object *obj ); -static struct async_queue *sock_get_ifchange_q( struct sock *sock ); -static void sock_destroy_ifchange_q( struct sock *sock ); +static struct object *sock_get_ifchange( struct sock *sock ); +static void sock_release_ifchange( struct sock *sock ); static int sock_get_poll_events( struct fd *fd ); static void sock_poll_event( struct fd *fd, int event ); @@ -537,7 +537,6 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd ) static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) { struct sock *sock = get_fd_user( fd ); - struct async_queue *ifchange_q; assert( sock->obj.ops == &sock_ops ); @@ -549,8 +548,9 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) set_error( STATUS_CANT_WAIT ); return 0; } - if (!(ifchange_q = sock_get_ifchange_q( sock ))) return 0; - queue_async( ifchange_q, async ); + if (!sock_get_ifchange( sock )) return 0; + if (!sock->ifchange_q && !(sock->ifchange_q = create_async_queue( sock->fd ))) return 0; + queue_async( sock->ifchange_q, async ); set_error( STATUS_PENDING ); return 1; default: @@ -618,10 +618,11 @@ static void sock_destroy( struct object *obj ) if ( sock->deferred ) release_object( sock->deferred ); + async_wake_up( sock->ifchange_q, STATUS_CANCELLED ); + sock_release_ifchange( sock ); free_async_queue( sock->read_q ); free_async_queue( sock->write_q ); - async_wake_up( sock->ifchange_q, STATUS_CANCELLED ); - sock_destroy_ifchange_q( sock ); + free_async_queue( sock->ifchange_q ); if (sock->event) release_object( sock->event ); if (sock->fd) { @@ -1038,9 +1039,9 @@ static void ifchange_wake_up( struct object *obj, unsigned int status ) { struct sock *sock = LIST_ENTRY( ptr, struct sock, ifchange_entry ); - assert( sock->ifchange_q ); + assert( sock->ifchange_obj ); async_wake_up( sock->ifchange_q, status ); /* issue ifchange notification for the socket */ - sock_destroy_ifchange_q( sock ); /* remove socket from list and decrement ifchange refcount */ + sock_release_ifchange( sock ); /* remove socket from list and decrement ifchange refcount */ } } @@ -1145,40 +1146,30 @@ static void ifchange_add_sock( struct object *obj, struct sock *sock ) } /* create a new ifchange queue for a specific socket or, if one already exists, reuse the existing one */ -static struct async_queue *sock_get_ifchange_q( struct sock *sock ) +static struct object *sock_get_ifchange( struct sock *sock ) { struct object *ifchange; - if (sock->ifchange_q) /* reuse existing ifchange_q for this socket */ - return sock->ifchange_q; + if (sock->ifchange_obj) /* reuse existing ifchange_obj for this socket */ + return sock->ifchange_obj; if (!(ifchange = get_ifchange())) return NULL; - /* create the ifchange notification queue */ - sock->ifchange_q = create_async_queue( sock->fd ); - if (!sock->ifchange_q) - { - release_object( ifchange ); - set_error( STATUS_NO_MEMORY ); - return NULL; - } - /* add the socket to the ifchange notification list */ ifchange_add_sock( ifchange, sock ); sock->ifchange_obj = ifchange; - return sock->ifchange_q; + return ifchange; } /* destroy an existing ifchange queue for a specific socket */ -static void sock_destroy_ifchange_q( struct sock *sock ) +static void sock_release_ifchange( struct sock *sock ) { - if (sock->ifchange_q) + if (sock->ifchange_obj) { list_remove( &sock->ifchange_entry ); - free_async_queue( sock->ifchange_q ); - sock->ifchange_q = NULL; release_object( sock->ifchange_obj ); + sock->ifchange_obj = NULL; } }
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
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
Results per page:
10
25
50
100
200