Module: wine Branch: refs/heads/master Commit: 5f6ac9c484da75fd8aec4f8dfe249adf85e98934 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=5f6ac9c484da75fd8aec4f8d...
Author: Mike McCormack mike@codeweavers.com Date: Thu Apr 20 01:02:19 2006 +0900
rpcrt4: Use rpcrt4_conn_read in RPCRT4_OpenBinding.
---
dlls/rpcrt4/rpc_binding.c | 10 ++-------- dlls/rpcrt4/rpc_binding.h | 3 +++ dlls/rpcrt4/rpc_message.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 8c8d8c6..63f0259 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -435,7 +435,7 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding /* we need to send a binding packet if we are client. */ if (!(*Connection)->server) { RpcPktHdr *hdr; - DWORD count; + LONG count; BYTE *response; RpcPktHdr *response_hdr;
@@ -458,13 +458,7 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding return E_OUTOFMEMORY; }
- /* get a reply */ - if (!ReadFile(NewConnection->conn, response, RPC_MAX_PACKET_SIZE, &count, NULL)) { - WARN("ReadFile failed with error %ld\n", GetLastError()); - RPCRT4_DestroyConnection(*Connection); - return RPC_S_PROTOCOL_ERROR; - } - + count = rpcrt4_conn_read(NewConnection, response, RPC_MAX_PACKET_SIZE); if (count < sizeof(response_hdr->common)) { WARN("received invalid header\n"); RPCRT4_DestroyConnection(*Connection); diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h index 5a65e48..52cff54 100644 --- a/dlls/rpcrt4/rpc_binding.h +++ b/dlls/rpcrt4/rpc_binding.h @@ -83,4 +83,7 @@ BOOL RPCRT4_RPCSSOnDemandCall(PRPCSS_NP_ HANDLE RPCRT4_GetMasterMutex(void); HANDLE RPCRT4_RpcssNPConnect(void);
+int rpcrt4_conn_read(RpcConnection *Connection, + void *buffer, unsigned int count); + #endif diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index 6e89ace..1e1c20c 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -306,8 +306,8 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Co * * Reads data from a connection */ -static int rpcrt4_conn_read(RpcConnection *Connection, - void *buffer, unsigned int count) +int rpcrt4_conn_read(RpcConnection *Connection, + void *buffer, unsigned int count) { DWORD dwRead = 0; if (!ReadFile(Connection->conn, buffer, count, &dwRead, NULL) &&