Shaun Ren : webservices: Fill in type description for WS_FAULT_TYPE if necessary in WsReadBody.
Alexandre Julliard
julliard at winehq.org
Fri Aug 5 14:42:32 CDT 2022
Module: wine
Branch: master
Commit: d8f230f219c7dcff3e873b7188377b73dc6b52b4
URL: https://gitlab.winehq.org/wine/wine/-/commit/d8f230f219c7dcff3e873b7188377b73dc6b52b4
Author: Shaun Ren <sren at codeweavers.com>
Date: Wed Aug 3 19:19:53 2022 -0400
webservices: Fill in type description for WS_FAULT_TYPE if necessary in WsReadBody.
Signed-off-by: Shaun Ren <sren at codeweavers.com>
---
dlls/webservices/msg.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index e4d4fce8ce4..36dbe564b85 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -1042,6 +1042,8 @@ HRESULT WINAPI WsReadBody( WS_MESSAGE *handle, const WS_ELEMENT_DESCRIPTION *des
WS_HEAP *heap, void *value, ULONG size, WS_ERROR *error )
{
struct msg *msg = (struct msg *)handle;
+ WS_ELEMENT_DESCRIPTION tmp;
+ WS_FAULT_DESCRIPTION fault_desc;
HRESULT hr;
TRACE( "%p %p %u %p %p %lu %p\n", handle, desc, option, heap, value, size, error );
@@ -1058,7 +1060,23 @@ HRESULT WINAPI WsReadBody( WS_MESSAGE *handle, const WS_ELEMENT_DESCRIPTION *des
}
if (msg->state != WS_MESSAGE_STATE_READING) hr = WS_E_INVALID_OPERATION;
- else hr = WsReadElement( msg->reader_body, desc, option, heap, value, size, NULL );
+ else
+ {
+ if (!desc->typeDescription)
+ {
+ if (desc->type == WS_FAULT_TYPE)
+ {
+ memcpy( &tmp, desc, sizeof(*desc) );
+ fault_desc.envelopeVersion = msg->version_env;
+ tmp.typeDescription = &fault_desc;
+ desc = &tmp;
+ }
+ else if (desc->type == WS_ENDPOINT_ADDRESS_TYPE)
+ FIXME( "!desc->typeDescription with WS_ENDPOINT_ADDRESS_TYPE\n" );
+ }
+
+ hr = WsReadElement( msg->reader_body, desc, option, heap, value, size, NULL );
+ }
LeaveCriticalSection( &msg->cs );
TRACE( "returning %#lx\n", hr );
More information about the wine-cvs
mailing list