Commit 366e693f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Trace return values.

parent 91ef13ce
......@@ -518,6 +518,7 @@ void WINAPI WsFreeChannel( WS_CHANNEL *handle )
HRESULT WINAPI WsResetChannel( WS_CHANNEL *handle, WS_ERROR *error )
{
struct channel *channel = (struct channel *)handle;
HRESULT hr = S_OK;
TRACE( "%p %p\n", handle, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -533,15 +534,13 @@ HRESULT WINAPI WsResetChannel( WS_CHANNEL *handle, WS_ERROR *error )
}
if (channel->state != WS_CHANNEL_STATE_CREATED && channel->state != WS_CHANNEL_STATE_CLOSED)
{
LeaveCriticalSection( &channel->cs );
return WS_E_INVALID_OPERATION;
}
hr = WS_E_INVALID_OPERATION;
else
reset_channel( channel );
LeaveCriticalSection( &channel->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -583,6 +582,7 @@ HRESULT WINAPI WsGetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID
}
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -611,6 +611,7 @@ HRESULT WINAPI WsSetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID
hr = prop_set( channel->prop, channel->prop_count, id, value, size );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -653,15 +654,11 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end
return E_INVALIDARG;
}
if (channel->state != WS_CHANNEL_STATE_CREATED)
{
LeaveCriticalSection( &channel->cs );
return WS_E_INVALID_OPERATION;
}
hr = open_channel( channel, endpoint );
if (channel->state != WS_CHANNEL_STATE_CREATED) hr = WS_E_INVALID_OPERATION;
else hr = open_channel( channel, endpoint );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -734,6 +731,7 @@ HRESULT WINAPI WsShutdownSessionChannel( WS_CHANNEL *handle, const WS_ASYNC_CONT
hr = shutdown_session( channel );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -749,6 +747,7 @@ static void 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 = S_OK;
TRACE( "%p %p %p\n", handle, ctx, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -767,7 +766,8 @@ HRESULT WINAPI WsCloseChannel( WS_CHANNEL *handle, const WS_ASYNC_CONTEXT *ctx,
close_channel( channel );
LeaveCriticalSection( &channel->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
static HRESULT parse_http_url( const WCHAR *url, ULONG len, URL_COMPONENTS *uc )
......@@ -1348,6 +1348,7 @@ HRESULT WINAPI WsSendMessage( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_MESS
done:
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -1388,6 +1389,7 @@ HRESULT WINAPI WsSendReplyMessage( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS
done:
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -1959,6 +1961,7 @@ HRESULT WINAPI WsReceiveMessage( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_M
hr = receive_message( channel, msg, desc, count, option, read_option, heap, value, size, index );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -1991,6 +1994,7 @@ HRESULT WINAPI WsReadMessageStart( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS
}
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -2020,6 +2024,7 @@ HRESULT WINAPI WsReadMessageEnd( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_A
hr = WsReadEnvelopeEnd( msg, NULL );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -2052,6 +2057,7 @@ HRESULT WINAPI WsWriteMessageStart( WS_CHANNEL *handle, WS_MESSAGE *msg, const W
done:
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -2081,6 +2087,7 @@ HRESULT WINAPI WsWriteMessageEnd( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_
if ((hr = WsWriteEnvelopeEnd( msg, NULL )) == S_OK) hr = send_message( channel, msg );
LeaveCriticalSection( &channel->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......
......@@ -151,6 +151,7 @@ void WINAPI WsFreeError( WS_ERROR *handle )
HRESULT WINAPI WsResetError( WS_ERROR *handle )
{
struct error *error = (struct error *)handle;
HRESULT hr = S_OK;
TRACE( "%p\n", handle );
......@@ -167,7 +168,8 @@ HRESULT WINAPI WsResetError( WS_ERROR *handle )
reset_error( error );
LeaveCriticalSection( &error->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -194,6 +196,7 @@ HRESULT WINAPI WsGetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, vo
hr = prop_get( error->prop, error->prop_count, id, buf, size );
LeaveCriticalSection( &error->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -227,14 +230,10 @@ HRESULT WINAPI WsSetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, co
return E_INVALIDARG;
}
if (id == WS_ERROR_PROPERTY_LANGID)
{
LeaveCriticalSection( &error->cs );
return WS_E_INVALID_OPERATION;
}
hr = prop_set( error->prop, error->prop_count, id, value, size );
if (id == WS_ERROR_PROPERTY_LANGID) hr = WS_E_INVALID_OPERATION;
else hr = prop_set( error->prop, error->prop_count, id, value, size );
LeaveCriticalSection( &error->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -260,6 +260,7 @@ void WINAPI WsFreeHeap( WS_HEAP *handle )
HRESULT WINAPI WsResetHeap( WS_HEAP *handle, WS_ERROR *error )
{
struct heap *heap = (struct heap *)handle;
HRESULT hr = S_OK;
TRACE( "%p %p\n", handle, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -277,7 +278,8 @@ HRESULT WINAPI WsResetHeap( WS_HEAP *handle, WS_ERROR *error )
reset_heap( heap );
LeaveCriticalSection( &heap->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -317,6 +319,7 @@ HRESULT WINAPI WsGetHeapProperty( WS_HEAP *handle, WS_HEAP_PROPERTY_ID id, void
}
LeaveCriticalSection( &heap->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......
......@@ -469,15 +469,11 @@ HRESULT WINAPI WsOpenListener( WS_LISTENER *handle, WS_STRING *url, const WS_ASY
return E_INVALIDARG;
}
if (listener->state != WS_LISTENER_STATE_CREATED)
{
LeaveCriticalSection( &listener->cs );
return WS_E_INVALID_OPERATION;
}
hr = open_listener( listener, url );
if (listener->state != WS_LISTENER_STATE_CREATED) hr = WS_E_INVALID_OPERATION;
else hr = open_listener( listener, url );
LeaveCriticalSection( &listener->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -493,6 +489,7 @@ static void close_listener( struct listener *listener )
HRESULT WINAPI WsCloseListener( WS_LISTENER *handle, const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error )
{
struct listener *listener = (struct listener *)handle;
HRESULT hr = S_OK;
TRACE( "%p %p %p\n", handle, ctx, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -511,7 +508,8 @@ HRESULT WINAPI WsCloseListener( WS_LISTENER *handle, const WS_ASYNC_CONTEXT *ctx
close_listener( listener );
LeaveCriticalSection( &listener->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -520,6 +518,7 @@ HRESULT WINAPI WsCloseListener( WS_LISTENER *handle, const WS_ASYNC_CONTEXT *ctx
HRESULT WINAPI WsResetListener( WS_LISTENER *handle, WS_ERROR *error )
{
struct listener *listener = (struct listener *)handle;
HRESULT hr = S_OK;
TRACE( "%p %p\n", handle, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -535,15 +534,13 @@ HRESULT WINAPI WsResetListener( WS_LISTENER *handle, WS_ERROR *error )
}
if (listener->state != WS_LISTENER_STATE_CREATED && listener->state != WS_LISTENER_STATE_CLOSED)
{
LeaveCriticalSection( &listener->cs );
return WS_E_INVALID_OPERATION;
}
hr = WS_E_INVALID_OPERATION;
else
reset_listener( listener );
LeaveCriticalSection( &listener->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -590,6 +587,7 @@ HRESULT WINAPI WsGetListenerProperty( WS_LISTENER *handle, WS_LISTENER_PROPERTY_
}
LeaveCriticalSection( &listener->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -618,6 +616,7 @@ HRESULT WINAPI WsSetListenerProperty( WS_LISTENER *handle, WS_LISTENER_PROPERTY_
hr = prop_set( listener->prop, listener->prop_count, id, value, size );
LeaveCriticalSection( &listener->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -645,12 +644,9 @@ HRESULT WINAPI WsAcceptChannel( WS_LISTENER *handle, WS_CHANNEL *channel_handle,
return E_INVALIDARG;
}
if (listener->state != WS_LISTENER_STATE_OPEN || listener->channel)
if (listener->state != WS_LISTENER_STATE_OPEN || listener->channel) hr = WS_E_INVALID_OPERATION;
else
{
LeaveCriticalSection( &listener->cs );
return WS_E_INVALID_OPERATION;
}
wait = listener->wait;
cancel = listener->cancel;
listener->channel = channel_handle;
......@@ -662,20 +658,26 @@ HRESULT WINAPI WsAcceptChannel( WS_LISTENER *handle, WS_CHANNEL *channel_handle,
SOCKET socket = listener->u.tcp.socket;
LeaveCriticalSection( &listener->cs );
return channel_accept_tcp( socket, wait, cancel, channel_handle );
hr = channel_accept_tcp( socket, wait, cancel, channel_handle );
TRACE( "returning %08x\n", hr );
return hr;
}
case WS_UDP_CHANNEL_BINDING:
{
SOCKET socket = listener->u.udp.socket;
LeaveCriticalSection( &listener->cs );
return channel_accept_udp( socket, wait, cancel, channel_handle );
hr = channel_accept_udp( socket, wait, cancel, channel_handle );
TRACE( "returning %08x\n", hr );
return hr;
}
default:
FIXME( "listener binding %u not supported\n", listener->binding );
break;
}
}
LeaveCriticalSection( &listener->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -219,6 +219,7 @@ HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type,
HRESULT WINAPI WsResetServiceProxy( WS_SERVICE_PROXY *handle, WS_ERROR *error )
{
struct proxy *proxy = (struct proxy *)handle;
HRESULT hr = S_OK;
TRACE( "%p %p\n", handle, error );
if (error) FIXME( "ignoring error parameter\n" );
......@@ -234,15 +235,13 @@ HRESULT WINAPI WsResetServiceProxy( WS_SERVICE_PROXY *handle, WS_ERROR *error )
}
if (proxy->state != WS_SERVICE_PROXY_STATE_CREATED && proxy->state != WS_SERVICE_PROXY_STATE_CLOSED)
{
LeaveCriticalSection( &proxy->cs );
return WS_E_INVALID_OPERATION;
}
hr = WS_E_INVALID_OPERATION;
else
reset_proxy( proxy );
LeaveCriticalSection( &proxy->cs );
return S_OK;
TRACE( "returning %08x\n", hr );
return hr;
}
/**************************************************************************
......@@ -304,6 +303,7 @@ HRESULT WINAPI WsGetServiceProxyProperty( WS_SERVICE_PROXY *handle, WS_PROXY_PRO
}
LeaveCriticalSection( &proxy->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -334,6 +334,7 @@ HRESULT WINAPI WsOpenServiceProxy( WS_SERVICE_PROXY *handle, const WS_ENDPOINT_A
proxy->state = WS_SERVICE_PROXY_STATE_OPEN;
LeaveCriticalSection( &proxy->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -363,6 +364,7 @@ HRESULT WINAPI WsCloseServiceProxy( WS_SERVICE_PROXY *handle, const WS_ASYNC_CON
proxy->state = WS_SERVICE_PROXY_STATE_CLOSED;
LeaveCriticalSection( &proxy->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
......@@ -544,5 +546,6 @@ HRESULT WINAPI WsCall( WS_SERVICE_PROXY *handle, const WS_OPERATION_DESCRIPTION
done:
WsFreeMessage( msg );
LeaveCriticalSection( &proxy->cs );
TRACE( "returning %08x\n", hr );
return hr;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment