Diff for /libaitrpc/src/cli.c between versions 1.16.8.4 and 1.16.8.6

version 1.16.8.4, 2013/08/22 11:55:45 version 1.16.8.6, 2013/08/22 14:01:00
Line 353  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res Line 353  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
                         return -1;                          return -1;
                 }                  }
   
   payload:
                 if (type == SOCK_STREAM) {                  if (type == SOCK_STREAM) {
                         memset(buf, 0, blen);                          memset(buf, 0, blen);
                         ret = recv(sock, buf, blen, 0);                          ret = recv(sock, buf, blen, 0);
                           /* handling case for reply without payload */
                           if (!ret && buf != AIT_GET_BUF(pkt))
                                   return (buf - AIT_GET_BUF(pkt));
                 } else {                  } else {
                         blen = AIT_LEN(pkt);                          blen = AIT_LEN(pkt);
                         memset(buf, 0, blen);                          memset(buf, 0, blen);
Line 390  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res Line 394  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
   
                                 /* calc estimated length */                                  /* calc estimated length */
                                 rpc = (struct tagRPCCall*) buf;                                  rpc = (struct tagRPCCall*) buf;
                                estlen = ntohl(rpc->call_len) + blen;                                estlen = ntohl(rpc->call_len);
                                printf("ret = %d len=%d\n", ret, estlen); 
                                 if (estlen > AIT_LEN(pkt))                                  if (estlen > AIT_LEN(pkt))
                                         AIT_RE_BUF(pkt, estlen);                                          AIT_RE_BUF(pkt, estlen);
                                 buf = AIT_GET_BUF(pkt) + blen;                                  buf = AIT_GET_BUF(pkt) + blen;
                                blen = AIT_LEN(pkt) - blen;                                blen = estlen - blen;
                                 goto payload;
                         } else                          } else
                                 ret += sizeof(struct tagRPCCall);                                  ret += sizeof(struct tagRPCCall);
                 }                  }

Removed from v.1.16.8.4  
changed lines
  Added in v.1.16.8.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>