Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern small SO_RCVTIMEO values are mistakenly taken to be...



details:   https://anonhg.NetBSD.org/src/rev/ac514d3f3e5d
branches:  trunk
changeset: 539833:ac514d3f3e5d
user:      itojun <itojun%NetBSD.org@localhost>
date:      Wed Nov 27 03:36:04 2002 +0000

description:
small SO_RCVTIMEO values are mistakenly taken to be zero.  FreeBSD PR kern/32827.

diffstat:

 sys/kern/uipc_socket.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r ce6e4d6c9562 -r ac514d3f3e5d sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Wed Nov 27 02:53:10 2002 +0000
+++ b/sys/kern/uipc_socket.c    Wed Nov 27 03:36:04 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.73 2002/11/26 18:44:35 christos Exp $        */
+/*     $NetBSD: uipc_socket.c,v 1.74 2002/11/27 03:36:04 itojun Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.73 2002/11/26 18:44:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.74 2002/11/27 03:36:04 itojun Exp $");
 
 #include "opt_sock_counters.h"
 #include "opt_sosend_loan.h"
@@ -1346,6 +1346,8 @@
                                goto bad;
                        }
                        val = tv->tv_sec * hz + tv->tv_usec / tick;
+                       if (val == 0 && tv->tv_usec != 0)
+                               val = 1;
 
                        switch (optname) {
 



Home | Main Index | Thread Index | Old Index