Author: kevans
Date: Mon Feb 26 18:24:24 2018
New Revision: 330028
URL: https://svnweb.freebsd.org/changeset/base/330028

Log:
  libsa: Partially revert r330023
  
  The removal of tmo >= MAXTMO check should not have been done; this is
  specifically what handles timeout if MAXWAIT == 0.
  
  MFC after:    1 week

Modified:
  head/stand/libsa/net.c

Modified: head/stand/libsa/net.c
==============================================================================
--- head/stand/libsa/net.c      Mon Feb 26 18:23:36 2018        (r330027)
+++ head/stand/libsa/net.c      Mon Feb 26 18:24:24 2018        (r330028)
@@ -110,6 +110,10 @@ sendrecv(struct iodesc *d,
                        return -1;
                }
                if (tleft <= 0) {
+                       if (tmo >= MAXTMO) {
+                               errno = ETIMEDOUT;
+                               return -1;
+                       }
                        cc = (*sproc)(d, sbuf, ssize);
                        if (cc != -1 && cc < ssize)
                                panic("sendrecv: short write! (%zd < %zd)",
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to