rpcrt4: Print error messages from RPC message functions when they are called in an invalid way.

This commit is contained in:
Rob Shearman 2008-09-12 12:59:02 +01:00 committed by Alexandre Julliard
parent 8cc3adea52
commit be9909ad1d
1 changed files with 11 additions and 1 deletions

View File

@ -1005,7 +1005,10 @@ RPC_STATUS WINAPI I_RpcNegotiateTransferSyntax(PRPC_MESSAGE pMsg)
TRACE("(%p)\n", pMsg);
if (!bind || bind->server)
{
ERR("no binding\n");
return RPC_S_INVALID_BINDING;
}
/* if we already have a connection, we don't need to negotiate again */
if (!pMsg->ReservedForRuntime)
@ -1065,7 +1068,10 @@ RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
TRACE("(%p): BufferLength=%d\n", pMsg, pMsg->BufferLength);
if (!bind)
{
ERR("no binding\n");
return RPC_S_INVALID_BINDING;
}
pMsg->Buffer = I_RpcAllocate(pMsg->BufferLength);
TRACE("Buffer=%p\n", pMsg->Buffer);
@ -1118,7 +1124,11 @@ RPC_STATUS WINAPI I_RpcFreeBuffer(PRPC_MESSAGE pMsg)
TRACE("(%p) Buffer=%p\n", pMsg, pMsg->Buffer);
if (!bind) return RPC_S_INVALID_BINDING;
if (!bind)
{
ERR("no binding\n");
return RPC_S_INVALID_BINDING;
}
if (pMsg->ReservedForRuntime)
{