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
fed06a56
Commit
fed06a56
authored
Sep 23, 2011
by
Louis Lenders
Committed by
Alexandre Julliard
Sep 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Fill the DPN_SP_CAPS structure in IDirectPlay8Peer_GetSPCaps with some sane values + tests.
parent
7c65ab91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
peer.c
dlls/dpnet/peer.c
+17
-2
peer.c
dlls/dpnet/tests/peer.c
+27
-0
No files found.
dlls/dpnet/peer.c
View file @
fed06a56
...
...
@@ -389,9 +389,24 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetSPCaps(IDirectPlay8Peer *iface, co
static
HRESULT
WINAPI
IDirectPlay8PeerImpl_GetSPCaps
(
IDirectPlay8Peer
*
iface
,
const
GUID
*
const
pguidSP
,
DPN_SP_CAPS
*
const
pdpspCaps
,
const
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p,%p,%x): stub
\n
"
,
iface
,
pguidSP
,
pdpspCaps
,
dwFlags
);
TRACE
(
"(%p)->(%p,%p,%x)
\n
"
,
iface
,
pguidSP
,
pdpspCaps
,
dwFlags
);
return
DPNERR_GENERIC
;
if
(
pdpspCaps
->
dwSize
!=
sizeof
(
DPN_SP_CAPS
))
{
return
DPNERR_INVALIDPARAM
;
}
pdpspCaps
->
dwFlags
=
DPNSPCAPS_SUPPORTSDPNSRV
|
DPNSPCAPS_SUPPORTSBROADCAST
|
DPNSPCAPS_SUPPORTSALLADAPTERS
|
DPNSPCAPS_SUPPORTSTHREADPOOL
;
pdpspCaps
->
dwNumThreads
=
3
;
pdpspCaps
->
dwDefaultEnumCount
=
5
;
pdpspCaps
->
dwDefaultEnumRetryInterval
=
1500
;
pdpspCaps
->
dwDefaultEnumTimeout
=
1500
;
pdpspCaps
->
dwMaxEnumPayloadSize
=
983
;
pdpspCaps
->
dwBuffersPerThread
=
1
;
pdpspCaps
->
dwSystemBufferSize
=
8192
;
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8PeerImpl_GetConnectionInfo
(
IDirectPlay8Peer
*
iface
,
const
DPNID
dpnid
,
...
...
dlls/dpnet/tests/peer.c
View file @
fed06a56
...
...
@@ -115,6 +115,32 @@ static void test_enum_service_providers(void)
ok
(
HeapFree
(
GetProcessHeap
(),
0
,
serv_prov_info
),
"Failed freeing server provider info
\n
"
);
}
static
void
test_get_sp_caps
(
void
)
{
DPN_SP_CAPS
caps
;
HRESULT
hr
;
memset
(
&
caps
,
0
,
sizeof
(
DPN_SP_CAPS
));
hr
=
IDirectPlay8Peer_GetSPCaps
(
peer
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"GetSPCaps unexpectedly returned %x
\n
"
,
hr
);
caps
.
dwSize
=
sizeof
(
DPN_SP_CAPS
);
hr
=
IDirectPlay8Peer_GetSPCaps
(
peer
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPN_OK
,
"GetSPCaps failed with %x
\n
"
,
hr
);
ok
(
caps
.
dwFlags
==
(
DPNSPCAPS_SUPPORTSDPNSRV
|
DPNSPCAPS_SUPPORTSBROADCAST
|
DPNSPCAPS_SUPPORTSALLADAPTERS
|
DPNSPCAPS_SUPPORTSTHREADPOOL
),
"provider unexpectedly misses some capability flags
\n
"
);
ok
(
caps
.
dwNumThreads
==
3
,
"expected 3, got %d
\n
"
,
caps
.
dwNumThreads
);
ok
(
caps
.
dwDefaultEnumCount
==
5
,
"expected 5, got %d
\n
"
,
caps
.
dwDefaultEnumCount
);
ok
(
caps
.
dwDefaultEnumRetryInterval
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumRetryInterval
);
ok
(
caps
.
dwDefaultEnumTimeout
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumTimeout
);
ok
(
caps
.
dwMaxEnumPayloadSize
==
983
,
"expected 983, got %d
\n
"
,
caps
.
dwMaxEnumPayloadSize
);
ok
(
caps
.
dwBuffersPerThread
==
1
,
"expected 1, got %d
\n
"
,
caps
.
dwBuffersPerThread
);
ok
(
caps
.
dwSystemBufferSize
==
8192
,
"expected 8192, got %d
\n
"
,
caps
.
dwSystemBufferSize
);
}
static
void
test_cleanup_dp
(
void
)
{
HRESULT
hr
;
...
...
@@ -132,5 +158,6 @@ START_TEST(peer)
{
test_init_dp
();
test_enum_service_providers
();
test_get_sp_caps
();
test_cleanup_dp
();
}
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