Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7b3024a2
Commit
7b3024a2
authored
Jun 26, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi: Implement Get/SetRemoteAddress.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ce9d734
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
10 deletions
+48
-10
msgparams.c
dlls/wsdapi/msgparams.c
+42
-4
msgparams.c
dlls/wsdapi/tests/msgparams.c
+6
-6
No files found.
dlls/wsdapi/msgparams.c
View file @
7b3024a2
...
...
@@ -33,6 +33,7 @@ typedef struct IWSDMessageParametersImpl {
IWSDMessageParameters
IWSDMessageParameters_iface
;
LONG
ref
;
IWSDAddress
*
localAddress
;
IWSDAddress
*
remoteAddress
;
}
IWSDMessageParametersImpl
;
typedef
struct
IWSDUdpMessageParametersImpl
{
...
...
@@ -74,6 +75,11 @@ static ULONG WINAPI IWSDMessageParametersImpl_Release(IWSDMessageParameters *ifa
IWSDAddress_Release
(
This
->
localAddress
);
}
if
(
This
->
remoteAddress
!=
NULL
)
{
IWSDAddress_Release
(
This
->
remoteAddress
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -126,14 +132,46 @@ static HRESULT WINAPI IWSDMessageParametersImpl_SetLocalAddress(IWSDMessageParam
static
HRESULT
WINAPI
IWSDMessageParametersImpl_GetRemoteAddress
(
IWSDMessageParameters
*
This
,
IWSDAddress
**
ppAddress
)
{
FIXME
(
"(%p, %p)
\n
"
,
This
,
ppAddress
);
return
E_NOTIMPL
;
IWSDMessageParametersImpl
*
impl
=
impl_from_IWSDMessageParameters
(
This
);
TRACE
(
"(%p, %p)
\n
"
,
impl
,
ppAddress
);
if
(
ppAddress
==
NULL
)
{
return
E_POINTER
;
}
if
(
impl
->
remoteAddress
==
NULL
)
{
return
E_ABORT
;
}
*
ppAddress
=
impl
->
remoteAddress
;
IWSDAddress_AddRef
(
*
ppAddress
);
return
S_OK
;
}
static
HRESULT
WINAPI
IWSDMessageParametersImpl_SetRemoteAddress
(
IWSDMessageParameters
*
This
,
IWSDAddress
*
pAddress
)
{
FIXME
(
"(%p, %p)
\n
"
,
This
,
pAddress
);
return
E_NOTIMPL
;
IWSDMessageParametersImpl
*
impl
=
impl_from_IWSDMessageParameters
(
This
);
TRACE
(
"(%p, %p)
\n
"
,
impl
,
pAddress
);
if
(
pAddress
==
NULL
)
{
return
E_POINTER
;
}
if
(
impl
->
remoteAddress
!=
NULL
)
{
IWSDAddress_Release
(
impl
->
remoteAddress
);
}
impl
->
remoteAddress
=
pAddress
;
IWSDAddress_AddRef
(
pAddress
);
return
S_OK
;
}
static
HRESULT
WINAPI
IWSDMessageParametersImpl_GetLowerParameters
(
IWSDMessageParameters
*
This
,
IWSDMessageParameters
**
ppTxParams
)
...
...
dlls/wsdapi/tests/msgparams.c
View file @
7b3024a2
...
...
@@ -142,11 +142,11 @@ static void RemoteAddress_tests(void)
ok
(
udpMessageParams
!=
NULL
,
"WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL
\n
"
);
rc
=
IWSDUdpMessageParameters_GetRemoteAddress
(
udpMessageParams
,
NULL
);
todo_wine
ok
(
rc
==
E_POINTER
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
rc
==
E_POINTER
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
returnedAddress
==
NULL
,
"GetRemoteAddress returned %p
\n
"
,
returnedAddress
);
rc
=
IWSDUdpMessageParameters_GetRemoteAddress
(
udpMessageParams
,
&
returnedAddress
);
todo_wine
ok
(
rc
==
E_ABORT
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
rc
==
E_ABORT
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
returnedAddress
==
NULL
,
"GetRemoteAddress returned %p
\n
"
,
returnedAddress
);
rc
=
WSDCreateUdpAddress
(
&
origUdpAddress
);
...
...
@@ -157,14 +157,14 @@ static void RemoteAddress_tests(void)
todo_wine
ok
(
rc
==
S_OK
,
"SetTransportAddress failed: %08x
\n
"
,
rc
);
rc
=
IWSDUdpMessageParameters_SetRemoteAddress
(
udpMessageParams
,
(
IWSDAddress
*
)
origUdpAddress
);
todo_wine
ok
(
rc
==
S_OK
,
"SetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"SetRemoteAddress failed: %08x
\n
"
,
rc
);
rc
=
IWSDUdpMessageParameters_GetRemoteAddress
(
udpMessageParams
,
&
returnedAddress
);
todo_wine
ok
(
rc
==
S_OK
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
todo_wine
ok
(
returnedAddress
!=
NULL
,
"GetLocalAddress returned NULL
\n
"
);
ok
(
rc
==
S_OK
,
"GetRemoteAddress failed: %08x
\n
"
,
rc
);
ok
(
returnedAddress
!=
NULL
,
"GetLocalAddress returned NULL
\n
"
);
/* Check if GetRemoteAddress returns the same object */
todo_wine
ok
(
returnedAddress
==
(
IWSDAddress
*
)
origUdpAddress
,
"returnedAddress != origUdpAddress
\n
"
);
ok
(
returnedAddress
==
(
IWSDAddress
*
)
origUdpAddress
,
"returnedAddress != origUdpAddress
\n
"
);
ret
=
IWSDUdpMessageParameters_Release
(
udpMessageParams
);
ok
(
ret
==
0
,
"IWSDUdpMessageParameters_Release() has %d references, should have 0
\n
"
,
ret
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment