Commit fe9a28e8 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Simplify WsAddressMessage.

parent ffd4caa5
......@@ -452,16 +452,13 @@ HRESULT WINAPI WsAddressMessage( WS_MESSAGE *handle, const WS_ENDPOINT_ADDRESS *
}
if (msg->state < WS_MESSAGE_STATE_INITIALIZED || msg->is_addressed) hr = WS_E_INVALID_OPERATION;
else
else if (addr && addr->url.length)
{
if (addr && addr->url.length)
if (!(msg->addr.chars = heap_alloc( addr->url.length * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
else
{
if (!(msg->addr.chars = heap_alloc( addr->url.length * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
else
{
memcpy( msg->addr.chars, addr->url.chars, addr->url.length * sizeof(WCHAR) );
msg->addr.length = addr->url.length;
}
memcpy( msg->addr.chars, addr->url.chars, addr->url.length * sizeof(WCHAR) );
msg->addr.length = addr->url.length;
}
}
if (hr == S_OK) msg->is_addressed = TRUE;
......
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