--- libaitrpc/src/cli.c 2013/08/22 11:55:45 1.16.8.4 +++ libaitrpc/src/cli.c 2013/08/22 12:11:35 1.16.8.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.16.8.4 2013/08/22 11:55:45 misho Exp $ +* $Id: cli.c,v 1.16.8.5 2013/08/22 12:11:35 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -353,6 +353,7 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res return -1; } +payload: if (type == SOCK_STREAM) { memset(buf, 0, blen); ret = recv(sock, buf, blen, 0); @@ -391,11 +392,11 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res /* calc estimated length */ rpc = (struct tagRPCCall*) buf; estlen = ntohl(rpc->call_len) + blen; - printf("ret = %d len=%d\n", ret, estlen); if (estlen > AIT_LEN(pkt)) AIT_RE_BUF(pkt, estlen); buf = AIT_GET_BUF(pkt) + blen; blen = AIT_LEN(pkt) - blen; + goto payload; } else ret += sizeof(struct tagRPCCall); }