Diff for /libaitrpc/src/cli.c between versions 1.23.2.5 and 1.23.2.6

version 1.23.2.5, 2015/01/21 20:28:41 version 1.23.2.6, 2015/01/21 20:58:07
Line 351  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res Line 351  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 if (type == SOCK_EXT) {                  else if (type == SOCK_EXT) {
                        ret = rpc_Read(sock, type, 0, NULL, AIT_GET_BUF(pkt), AIT_LEN(pkt));                        ret = rpc_Read(sock, type, 0, NULL, buf, blen);
                        if (ret > 0)                        if (estlen)       /* hack for skip sanity checks */
                                estlen = ret;                                ret += sizeof(struct tagRPCCall);
                 } else if (type == SOCK_BPF) {                  } else if (type == SOCK_BPF) {
                         ret = rpc_Read(sock, type, 0, sa, AIT_GET_BUF(pkt), AIT_LEN(pkt));                          ret = rpc_Read(sock, type, 0, sa, AIT_GET_BUF(pkt), AIT_LEN(pkt));
                         if (ret > 0)                          if (ret > 0)
Line 370  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res Line 370  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
                 }                  }
   
                 /* check for loop request */                  /* check for loop request */
                if (!(rpc->call_io & RPC_ACK))                if (!estlen && !(rpc->call_io & RPC_ACK))
                         continue;                          continue;
   
                 /* check for response from known address */                  /* check for response from known address */
Line 379  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res Line 379  rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
                         estlen = ntohl(rpc->call_len);                          estlen = ntohl(rpc->call_len);
                         if (estlen > AIT_LEN(pkt))                          if (estlen > AIT_LEN(pkt))
                                 AIT_RE_BUF(pkt, estlen);                                  AIT_RE_BUF(pkt, estlen);
                           blen = estlen;
                         buf = AIT_GET_BUF(pkt);                          buf = AIT_GET_BUF(pkt);
   
                           if (type == SOCK_EXT) {
                                   blen -= sizeof(struct tagRPCCall);
                                   buf += sizeof(struct tagRPCCall);
                           }
   
                         rpc = (struct tagRPCCall*) buf;                          rpc = (struct tagRPCCall*) buf;
                         blen = estlen;  
                         continue;                          continue;
                 }                  }
   

Removed from v.1.23.2.5  
changed lines
  Added in v.1.23.2.6


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