patch-1.3.51 linux/net/core/sock.c

Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/net_alias.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.50/linux/net/core/sock.c linux/net/core/sock.c
@@ -66,6 +66,7 @@
  *					(compatibility fix)
  *		Alan Cox	:	Added optimistic memory grabbing for AF_UNIX throughput.
  *		Alan Cox	:	Allocator for a socket is settable.
+ *		Alan Cox	:	SO_ERROR includes soft errors.
  *
  * To Fix:
  *
@@ -259,8 +260,9 @@
 			break;
 
 		case SO_ERROR:
-			val = sk->err;
-			sk->err = 0;
+			val = sock_error(sk);
+			if(val==0)
+				val=xchg(&sk->err_soft,0);
 			break;
 
 		case SO_OOBINLINE:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this