patch-2.4.2 linux/net/core/datagram.c
Next file: linux/net/core/iovec.c
Previous file: linux/net/bridge/br_private_stp.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Sat Feb 3 10:39:12 2001
- Orig file:
v2.4.1/linux/net/core/datagram.c
- Orig date:
Sat Nov 11 19:02:40 2000
diff -u --recursive --new-file v2.4.1/linux/net/core/datagram.c linux/net/core/datagram.c
@@ -72,19 +72,19 @@
/* Socket errors? */
error = sock_error(sk);
if (error)
- goto out;
+ goto out_err;
if (!skb_queue_empty(&sk->receive_queue))
goto ready;
/* Socket shut down? */
if (sk->shutdown & RCV_SHUTDOWN)
- goto out;
+ goto out_noerr;
/* Sequenced packets can come disconnected. If so we report the problem */
error = -ENOTCONN;
if(connection_based(sk) && !(sk->state==TCP_ESTABLISHED || sk->state==TCP_LISTEN))
- goto out;
+ goto out_err;
/* handle signals */
if (signal_pending(current))
@@ -99,11 +99,16 @@
interrupted:
error = sock_intr_errno(*timeo_p);
+out_err:
+ *err = error;
out:
current->state = TASK_RUNNING;
remove_wait_queue(sk->sleep, &wait);
- *err = error;
return error;
+out_noerr:
+ *err = 0;
+ error = 1;
+ goto out;
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)