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
9cacff8e
Commit
9cacff8e
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 WsCreateChannelForListener.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
823aa24f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
8 deletions
+70
-8
channel.c
dlls/webservices/channel.c
+32
-7
listener.c
dlls/webservices/tests/listener.c
+37
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/channel.c
View file @
9cacff8e
...
...
@@ -213,8 +213,35 @@ HRESULT WINAPI WsCreateChannel( WS_CHANNEL_TYPE type, WS_CHANNEL_BINDING binding
return
E_NOTIMPL
;
}
if
((
hr
=
create_channel
(
type
,
binding
,
properties
,
count
,
&
channel
))
!=
S_OK
)
return
hr
;
if
((
hr
=
create_channel
(
type
,
binding
,
properties
,
count
,
&
channel
))
!=
S_OK
)
return
hr
;
*
handle
=
(
WS_CHANNEL
*
)
channel
;
return
S_OK
;
}
/**************************************************************************
* WsCreateChannelForListener [webservices.@]
*/
HRESULT
WINAPI
WsCreateChannelForListener
(
WS_LISTENER
*
listener_handle
,
const
WS_CHANNEL_PROPERTY
*
properties
,
ULONG
count
,
WS_CHANNEL
**
handle
,
WS_ERROR
*
error
)
{
struct
channel
*
channel
;
WS_CHANNEL_TYPE
type
;
WS_CHANNEL_BINDING
binding
;
HRESULT
hr
;
TRACE
(
"%p %p %u %p %p
\n
"
,
listener_handle
,
properties
,
count
,
handle
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
listener_handle
||
!
handle
)
return
E_INVALIDARG
;
if
((
hr
=
WsGetListenerProperty
(
listener_handle
,
WS_LISTENER_PROPERTY_CHANNEL_TYPE
,
&
type
,
sizeof
(
type
),
NULL
))
!=
S_OK
)
return
hr
;
if
((
hr
=
WsGetListenerProperty
(
listener_handle
,
WS_LISTENER_PROPERTY_CHANNEL_BINDING
,
&
binding
,
sizeof
(
binding
),
NULL
))
!=
S_OK
)
return
hr
;
if
((
hr
=
create_channel
(
type
,
binding
,
properties
,
count
,
&
channel
))
!=
S_OK
)
return
hr
;
*
handle
=
(
WS_CHANNEL
*
)
channel
;
return
S_OK
;
...
...
@@ -393,11 +420,10 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end
return
hr
;
}
static
HRESULT
close_channel
(
struct
channel
*
channel
)
static
void
close_channel
(
struct
channel
*
channel
)
{
reset_channel
(
channel
);
channel
->
state
=
WS_CHANNEL_STATE_CLOSED
;
return
S_OK
;
}
/**************************************************************************
...
...
@@ -406,7 +432,6 @@ static HRESULT close_channel( struct channel *channel )
HRESULT
WINAPI
WsCloseChannel
(
WS_CHANNEL
*
handle
,
const
WS_ASYNC_CONTEXT
*
ctx
,
WS_ERROR
*
error
)
{
struct
channel
*
channel
=
(
struct
channel
*
)
handle
;
HRESULT
hr
;
TRACE
(
"%p %p %p
\n
"
,
handle
,
ctx
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
...
...
@@ -422,10 +447,10 @@ HRESULT WINAPI WsCloseChannel( WS_CHANNEL *handle, const WS_ASYNC_CONTEXT *ctx,
return
E_INVALIDARG
;
}
hr
=
close_channel
(
channel
);
close_channel
(
channel
);
LeaveCriticalSection
(
&
channel
->
cs
);
return
hr
;
return
S_OK
;
}
static
HRESULT
parse_url
(
const
WCHAR
*
url
,
ULONG
len
,
URL_COMPONENTS
*
uc
)
...
...
dlls/webservices/tests/listener.c
View file @
9cacff8e
...
...
@@ -154,8 +154,45 @@ static void test_WsOpenListener(void)
WsFreeListener
(
listener
);
}
static
void
test_WsCreateChannelForListener
(
void
)
{
WS_LISTENER
*
listener
;
WS_CHANNEL
*
channel
;
WS_CHANNEL_TYPE
type
;
WS_CHANNEL_STATE
state
;
HRESULT
hr
;
hr
=
WsCreateChannelForListener
(
NULL
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateChannelForListener
(
NULL
,
NULL
,
0
,
&
channel
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateListener
(
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
WS_TCP_CHANNEL_BINDING
,
NULL
,
0
,
NULL
,
&
listener
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
channel
=
NULL
;
hr
=
WsCreateChannelForListener
(
listener
,
NULL
,
0
,
&
channel
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
channel
!=
NULL
,
"channel not set
\n
"
);
type
=
0xdeadbeef
;
hr
=
WsGetChannelProperty
(
channel
,
WS_CHANNEL_PROPERTY_CHANNEL_TYPE
,
&
type
,
sizeof
(
type
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
"got %u
\n
"
,
type
);
state
=
0xdeadbeef
;
hr
=
WsGetChannelProperty
(
channel
,
WS_CHANNEL_PROPERTY_STATE
,
&
state
,
sizeof
(
state
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
state
==
WS_CHANNEL_STATE_CREATED
,
"got %u
\n
"
,
state
);
WsFreeChannel
(
channel
);
WsFreeListener
(
listener
);
}
START_TEST
(
listener
)
{
test_WsCreateListener
();
test_WsOpenListener
();
test_WsCreateChannelForListener
();
}
dlls/webservices/webservices.spec
View file @
9cacff8e
...
...
@@ -21,7 +21,7 @@
@ stub WsCopyError
@ stdcall WsCopyNode(ptr ptr ptr)
@ stdcall WsCreateChannel(long long ptr long ptr ptr ptr)
@ st
ub WsCreateChannelForListener
@ st
dcall WsCreateChannelForListener(ptr ptr long ptr ptr)
@ stdcall WsCreateError(ptr long ptr)
@ stub WsCreateFaultFromError
@ stdcall WsCreateHeap(long long ptr long ptr ptr)
...
...
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