Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern In sosend(), if so_error is set, clear it before re...
details: https://anonhg.NetBSD.org/src/rev/08fdb271b481
branches: trunk
changeset: 473578:08fdb271b481
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jun 08 02:39:57 1999 +0000
description:
In sosend(), if so_error is set, clear it before returning the error to
the process (i.e. pre-Reno behavior). The 4.4BSD behavior (introduced
in Reno) caused transient errors to stick incorrectly.
This is from PR #7640 (Havard Eidnes), cross-checked w/ FreeBSD, where
Bill Fenner committed the same fix (as described in a comment in the
Vat sources, by Van Jacobsen).
diffstat:
sys/kern/uipc_socket.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r e8c152832b93 -r 08fdb271b481 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Tue Jun 08 00:46:38 1999 +0000
+++ b/sys/kern/uipc_socket.c Tue Jun 08 02:39:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.47 1999/05/15 22:37:22 sommerfeld Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.48 1999/06/08 02:39:57 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1990, 1993
@@ -404,8 +404,12 @@
s = splsoftnet();
if (so->so_state & SS_CANTSENDMORE)
snderr(EPIPE);
- if (so->so_error)
- snderr(so->so_error);
+ if (so->so_error) {
+ error = so->so_error;
+ so->so_error = 0;
+ splx(s);
+ goto release;
+ }
if ((so->so_state & SS_ISCONNECTED) == 0) {
if (so->so_proto->pr_flags & PR_CONNREQUIRED) {
if ((so->so_state & SS_ISCONFIRMING) == 0 &&
Home |
Main Index |
Thread Index |
Old Index