--- libaitrpc/src/cli.c 2013/09/05 00:27:10 1.18.2.1 +++ libaitrpc/src/cli.c 2013/11/14 22:53:12 1.19.6.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.18.2.1 2013/09/05 00:27:10 misho Exp $ +* $Id: cli.c,v 1.19.6.1 2013/11/14 22:53:12 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -303,14 +303,14 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res if (type == SOCK_STREAM) ret = rpc_Read(sock, type, !estlen ? MSG_PEEK : 0, NULL, buf, blen); 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) { LOGERR; return -1; } /* check for response from known address */ - if (type == SOCK_STREAM && !estlen) { + if (!estlen) { /* 1st read for RPC header */ if (ret < sizeof(struct tagRPCCall)) { rpc_SetErr(ERPCMISMATCH, "Short RPC packet %d bytes", ret);