Robert Shearman : rpcrt4: Raise exceptions in NdrSendReceive if I_RpcSendReceive failed.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 3 12:03:02 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 666baea161348f34dc60b5491d0d8b2214df870c
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=666baea161348f34dc60b5491d0d8b2214df870c

Author: Robert Shearman <rob at codeweavers.com>
Date:   Fri Feb  3 18:46:32 2006 +0100

rpcrt4: Raise exceptions in NdrSendReceive if I_RpcSendReceive failed.

---

 dlls/rpcrt4/ndr_midl.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/rpcrt4/ndr_midl.c b/dlls/rpcrt4/ndr_midl.c
index 723c3c1..cc43817 100644
--- a/dlls/rpcrt4/ndr_midl.c
+++ b/dlls/rpcrt4/ndr_midl.c
@@ -269,6 +269,8 @@ void WINAPI NdrFreeBuffer(MIDL_STUB_MESS
  */
 unsigned char *WINAPI NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char *buffer  )
 {
+  RPC_STATUS status;
+
   TRACE("(stubmsg == ^%p, buffer == ^%p)\n", stubmsg, buffer);
 
   /* FIXME: how to handle errors? (raise exception?) */
@@ -281,10 +283,9 @@ unsigned char *WINAPI NdrSendReceive( MI
     return NULL;
   }
 
-  if (I_RpcSendReceive(stubmsg->RpcMsg) != RPC_S_OK) {
-    WARN("I_RpcSendReceive did not return success.\n");
-    /* FIXME: raise exception? */
-  }
+  status = I_RpcSendReceive(stubmsg->RpcMsg);
+  if (status != RPC_S_OK)
+    RpcRaiseException(status);
 
   stubmsg->BufferLength = stubmsg->RpcMsg->BufferLength;
   stubmsg->BufferStart = stubmsg->RpcMsg->Buffer;




More information about the wine-cvs mailing list