version 1.18.2.1, 2013/09/05 00:27:10
|
version 1.19.6.2, 2013/11/15 09:18:38
|
Line 303 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
Line 303 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
if (type == SOCK_STREAM) |
if (type == SOCK_STREAM) |
ret = rpc_Read(sock, type, !estlen ? MSG_PEEK : 0, NULL, buf, blen); |
ret = rpc_Read(sock, type, !estlen ? MSG_PEEK : 0, NULL, buf, blen); |
else |
else |
ret = rpc_Read(sock, type, 0, sa, buf, AIT_LEN(pkt)); | ret = rpc_Read(sock, type, !estlen ? MSG_PEEK : 0, sa, buf, blen); |
if (ret < 1) { | if (ret < 1) |
LOGERR; | |
return -1; |
return -1; |
} |
|
|
|
/* check for response from known address */ |
/* check for response from known address */ |
if (type == SOCK_STREAM && !estlen) { | if (!estlen) { |
/* 1st read for RPC header */ |
/* 1st read for RPC header */ |
if (ret < sizeof(struct tagRPCCall)) { |
if (ret < sizeof(struct tagRPCCall)) { |
rpc_SetErr(ERPCMISMATCH, "Short RPC packet %d bytes", ret); |
rpc_SetErr(ERPCMISMATCH, "Short RPC packet %d bytes", ret); |
Line 332 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
Line 330 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
break; |
break; |
} while (42); |
} while (42); |
|
|
if (ret < sizeof(struct tagRPCCall)) { | if (ret < sizeof(struct tagRPCCall) || estlen != ret) { |
rpc_SetErr(ERPCMISMATCH, "Short RPC packet %d bytes", ret); | rpc_SetErr(ERPCMISMATCH, "RPC packet mismatch estimate %d bytes, but received %d\n", |
| estlen, ret); |
return -1; |
return -1; |
} |
} |
|
|