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
a3999d77
Commit
a3999d77
authored
Apr 20, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsResetListener.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9cacff8e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
1 deletion
+84
-1
listener.c
dlls/webservices/listener.c
+32
-0
listener.c
dlls/webservices/tests/listener.c
+51
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/listener.c
View file @
a3999d77
...
...
@@ -361,6 +361,38 @@ HRESULT WINAPI WsCloseListener( WS_LISTENER *handle, const WS_ASYNC_CONTEXT *ctx
}
/**************************************************************************
* WsResetListener [webservices.@]
*/
HRESULT
WINAPI
WsResetListener
(
WS_LISTENER
*
handle
,
WS_ERROR
*
error
)
{
struct
listener
*
listener
=
(
struct
listener
*
)
handle
;
TRACE
(
"%p %p
\n
"
,
handle
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
listener
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
listener
->
cs
);
if
(
listener
->
magic
!=
LISTENER_MAGIC
)
{
LeaveCriticalSection
(
&
listener
->
cs
);
return
E_INVALIDARG
;
}
if
(
listener
->
state
!=
WS_LISTENER_STATE_CREATED
&&
listener
->
state
!=
WS_LISTENER_STATE_CLOSED
)
{
LeaveCriticalSection
(
&
listener
->
cs
);
return
WS_E_INVALID_OPERATION
;
}
reset_listener
(
listener
);
LeaveCriticalSection
(
&
listener
->
cs
);
return
S_OK
;
}
/**************************************************************************
* WsGetListenerProperty [webservices.@]
*/
HRESULT
WINAPI
WsGetListenerProperty
(
WS_LISTENER
*
handle
,
WS_LISTENER_PROPERTY_ID
id
,
void
*
buf
,
...
...
dlls/webservices/tests/listener.c
View file @
a3999d77
...
...
@@ -190,9 +190,60 @@ static void test_WsCreateChannelForListener(void)
WsFreeListener
(
listener
);
}
static
void
test_WsResetListener
(
void
)
{
WCHAR
str
[]
=
{
'n'
,
'e'
,
't'
,
'.'
,
't'
,
'c'
,
'p'
,
':'
,
'/'
,
'/'
,
'+'
,
':'
,
'2'
,
'0'
,
'1'
,
'7'
,
'/'
,
'p'
,
'a'
,
't'
,
'h'
};
WS_STRING
url
=
{
sizeof
(
str
)
/
sizeof
(
str
[
0
]),
str
};
WS_LISTENER
*
listener
;
WS_LISTENER_STATE
state
;
WS_LISTENER_PROPERTY
prop
;
ULONG
size
,
timeout
=
1000
;
HRESULT
hr
;
hr
=
WsResetListener
(
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
prop
.
id
=
WS_LISTENER_PROPERTY_CONNECT_TIMEOUT
;
prop
.
value
=
&
timeout
;
prop
.
valueSize
=
sizeof
(
timeout
);
hr
=
WsCreateListener
(
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
WS_TCP_CHANNEL_BINDING
,
&
prop
,
1
,
NULL
,
&
listener
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsResetListener
(
listener
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsOpenListener
(
listener
,
&
url
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsResetListener
(
listener
,
NULL
);
ok
(
hr
==
WS_E_INVALID_OPERATION
,
"got %08x
\n
"
,
hr
);
hr
=
WsCloseListener
(
listener
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsResetListener
(
listener
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
state
=
0xdeadbeef
;
size
=
sizeof
(
state
);
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_STATE
,
&
state
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
state
==
WS_LISTENER_STATE_CREATED
,
"got %u
\n
"
,
state
);
timeout
=
0xdeadbeef
;
size
=
sizeof
(
timeout
);
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_CONNECT_TIMEOUT
,
&
timeout
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
timeout
==
1000
,
"got %u
\n
"
,
timeout
);
WsFreeListener
(
listener
);
}
START_TEST
(
listener
)
{
test_WsCreateListener
();
test_WsOpenListener
();
test_WsCreateChannelForListener
();
test_WsResetListener
();
}
dlls/webservices/webservices.spec
View file @
a3999d77
...
...
@@ -136,7 +136,7 @@
@ stdcall WsResetChannel(ptr ptr)
@ stdcall WsResetError(ptr)
@ stdcall WsResetHeap(ptr ptr)
@ st
ub WsResetListener
@ st
dcall WsResetListener(ptr ptr)
@ stdcall WsResetMessage(ptr ptr)
@ stub WsResetMetadata
@ stub WsResetServiceHost
...
...
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