Rob Shearman : rpcrt4: Errors in sending or receiving packets should result in RPC_S_CALL_FAILED being returned , not RPC_S_PROTOCOL_ERROR.
Alexandre Julliard
julliard at winehq.org
Fri Nov 30 07:56:20 CST 2007
Module: wine
Branch: master
Commit: 34522de870f14af0ed3bcffd24cd9138e6270098
URL: http://source.winehq.org/git/wine.git/?a=commit;h=34522de870f14af0ed3bcffd24cd9138e6270098
Author: Rob Shearman <rob at codeweavers.com>
Date: Thu Nov 29 15:42:20 2007 +0000
rpcrt4: Errors in sending or receiving packets should result in RPC_S_CALL_FAILED being returned, not RPC_S_PROTOCOL_ERROR.
---
dlls/rpcrt4/rpc_message.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index 91572b1..5b4d30e 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -532,7 +532,7 @@ write:
if (count<0) {
WARN("rpcrt4_conn_write failed (auth)\n");
RPCRT4_SetThreadCurrentConnection(NULL);
- return RPC_S_PROTOCOL_ERROR;
+ return RPC_S_CALL_FAILED;
}
buffer_pos += Header->common.frag_len - hdr_size - alen - auth_pad_len;
@@ -708,7 +708,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr));
if (dwRead != sizeof(common_hdr)) {
WARN("Short read of header, %d bytes\n", dwRead);
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_CALL_FAILED;
goto fail;
}
@@ -734,7 +734,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
dwRead = rpcrt4_conn_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr));
if (dwRead != hdr_length - sizeof(common_hdr)) {
WARN("bad header length, %d bytes, hdr_length %d\n", dwRead, hdr_length);
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_CALL_FAILED;
goto fail;
}
@@ -760,7 +760,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
if (auth_length) {
auth_data = HeapAlloc(GetProcessHeap(), 0, RPC_AUTH_VERIFIER_LEN(&common_hdr));
if (!auth_data) {
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_OUT_OF_RESOURCES;
goto fail;
}
}
@@ -806,7 +806,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
(unsigned char *)pMsg->Buffer + buffer_length, data_length);
if (dwRead != data_length) {
WARN("bad data length, %d/%ld\n", dwRead, data_length);
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_CALL_FAILED;
goto fail;
}
@@ -826,7 +826,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
if (dwRead != header_auth_len) {
WARN("bad authentication data length, %d/%d\n", dwRead,
header_auth_len);
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_CALL_FAILED;
goto fail;
}
@@ -854,7 +854,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
dwRead = rpcrt4_conn_read(Connection, *Header, hdr_length);
if (dwRead != hdr_length) {
WARN("invalid packet header size (%d)\n", dwRead);
- status = RPC_S_PROTOCOL_ERROR;
+ status = RPC_S_CALL_FAILED;
goto fail;
}
More information about the wine-cvs
mailing list