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

Next file: linux/net/ipv4/igmp.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.13/linux/net/core/sock.c linux/net/core/sock.c
@@ -70,6 +70,7 @@
  *		Alan Cox	:	Allow NULL arguments on some SO_ opts
  *		Alan Cox	: 	Generic socket allocation to make hooks
  *					easier (suggested by Craig Metz).
+ *		Michael Pall	:	SO_ERROR returns positive errno again
  *
  * To Fix:
  *
@@ -280,7 +281,7 @@
 			break;
 
 		case SO_ERROR:
-			val = sock_error(sk);
+			val = -sock_error(sk);
 			if(val==0)
 				val=xchg(&sk->err_soft,0);
 			break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov