--- libaitrpc/src/cli.c 2013/08/23 13:13:07 1.17.2.1 +++ libaitrpc/src/cli.c 2013/09/05 00:27:10 1.18.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.17.2.1 2013/08/23 13:13:07 misho Exp $ +* $Id: cli.c,v 1.18.2.1 2013/09/05 00:27:10 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -300,12 +300,10 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res /* reply from RPC server */ do { - printf("START estlen=%d blen=%d\n", estlen, blen); 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)); - printf("RET=%d\n", ret); if (ret < 1) { LOGERR; return -1; @@ -326,10 +324,11 @@ rpc_pkt_Receive(int sock, int type, sockaddr_t * __res AIT_RE_BUF(pkt, estlen); buf = AIT_GET_BUF(pkt); blen = estlen; - printf("estlen=%d blen=%d\n", estlen, blen); + rpc = (struct tagRPCCall*) buf; continue; } + /* compiler optimize loop if while(0) and stop working 'continue' on some platforms */ break; } while (42); @@ -381,7 +380,7 @@ rpc_pkt_Request(ait_val_t * __restrict pkt, rpc_sess_t rpc->call_argc = htons(array_Size(vars)); /* set reply */ - rpc->call_req.flags = noreply ? RPC_NOREPLY : RPC_REPLY; + rpc->call_req.flags = (uint64_t) htonl(noreply ? RPC_NOREPLY : RPC_REPLY); if (array_Size(vars)) { /* marshaling variables */