Robert Shearman : rpcrt4: Automatically resolve the endpoint.

Alexandre Julliard julliard at wine.codeweavers.com
Mon May 8 09:05:49 CDT 2006


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

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon May  8 12:35:02 2006 +0100

rpcrt4: Automatically resolve the endpoint.

---

 dlls/rpcrt4/rpc_message.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index c0bff41..7646f98 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -470,6 +470,14 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE
   } else {
     cif = pMsg->RpcInterfaceInformation;
     if (!cif) return RPC_S_INTERFACE_NOT_FOUND; /* ? */
+
+    if (!bind->Endpoint || !bind->Endpoint[0])
+    {
+      TRACE("automatically resolving partially bound binding\n");
+      status = RpcEpResolveBinding(bind, cif);
+      if (status != RPC_S_OK) return status;
+    }
+
     status = RPCRT4_OpenBinding(bind, &conn, &cif->TransferSyntax,
                                 &cif->InterfaceId);
   }
@@ -533,6 +541,14 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESS
     } else {
       cif = pMsg->RpcInterfaceInformation;
       if (!cif) return RPC_S_INTERFACE_NOT_FOUND; /* ? */
+
+      if (!bind->Endpoint || !bind->Endpoint[0])
+      {
+        TRACE("automatically resolving partially bound binding\n");
+        status = RpcEpResolveBinding(bind, cif);
+        if (status != RPC_S_OK) return status;
+      }
+
       status = RPCRT4_OpenBinding(bind, &conn, &cif->TransferSyntax,
                                   &cif->InterfaceId);
     }




More information about the wine-cvs mailing list