Commit 5f6ac9c4 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

rpcrt4: Use rpcrt4_conn_read in RPCRT4_OpenBinding.

parent 71fc596a
......@@ -435,7 +435,7 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
/* 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* Binding, RpcConnection** Connection,
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);
......
......@@ -83,4 +83,7 @@ BOOL RPCRT4_RPCSSOnDemandCall(PRPCSS_NP_MESSAGE msg, char *vardata_payload, PRPC
HANDLE RPCRT4_GetMasterMutex(void);
HANDLE RPCRT4_RpcssNPConnect(void);
int rpcrt4_conn_read(RpcConnection *Connection,
void *buffer, unsigned int count);
#endif
......@@ -306,7 +306,7 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Connection, RpcPktHdr *Header,
*
* Reads data from a connection
*/
static int rpcrt4_conn_read(RpcConnection *Connection,
int rpcrt4_conn_read(RpcConnection *Connection,
void *buffer, unsigned int count)
{
DWORD dwRead = 0;
......
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