Print this page
3910 t_look(3NSL) should never return T_ERROR

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnsl/rpc/svc_dg.c
          +++ new/usr/src/lib/libnsl/rpc/svc_dg.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
       23 + * Copyright 2014 Gary Mills
  23   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27   28  /* All Rights Reserved */
  28   29  /*
  29   30   * Portions of this source code were derived from Berkeley
  30   31   * 4.3 BSD under license from the Regents of the University of
  31   32   * California.
  32   33   */
↓ open down ↓ 344 lines elided ↑ open up ↑
 377  378          moreflag = 0;
 378  379          if (t_rcvudata(xprt->xp_fd, tu_data, &moreflag) == -1) {
 379  380  #ifdef RPC_DEBUG
 380  381                  syslog(LOG_ERR, "svc_dg_recv: t_rcvudata t_errno=%d errno=%d\n",
 381  382                      t_errno, errno);
 382  383  #endif
 383  384                  if (t_errno == TLOOK) {
 384  385                          int lookres;
 385  386  
 386  387                          lookres = t_look(xprt->xp_fd);
 387      -                        if ((lookres & T_UDERR) &&
      388 +                        if ((lookres == T_UDERR) &&
 388  389                              (t_rcvuderr(xprt->xp_fd,
 389  390                                      (struct t_uderr *)0) < 0)) {
 390  391                                  /*EMPTY*/
 391  392  #ifdef RPC_DEBUG
 392  393                                  syslog(LOG_ERR,
 393  394                                  "svc_dg_recv: t_rcvuderr t_errno = %d\n",
 394  395                                          t_errno);
 395  396  #endif
 396  397                          }
 397      -                        if (lookres & T_DATA)
      398 +                        if (lookres == T_DATA)
 398  399                                  goto again;
 399  400                  } else if ((errno == EINTR) && (t_errno == TSYSERR))
 400  401                          goto again;
 401  402                  else {
 402  403                          return (FALSE);
 403  404                  }
 404  405          }
 405  406  
 406  407          if ((moreflag) ||
 407  408              (tu_data->udata.len < 4 * (uint_t)sizeof (uint32_t))) {
↓ open down ↓ 520 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX