Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2018 18:24:24 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330028 - head/stand/libsa
Message-ID:  <201802261824.w1QIOOoR098904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802261824.w1QIOOoR098904>