patch-1.3.17 linux/net/core/datagram.c
Next file: linux/net/core/dev.c
Previous file: linux/net/core/Makefile
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Wed Aug 9 14:04:28 1995
- Orig file:
v1.3.16/linux/net/core/datagram.c
- Orig date:
Thu Jul 13 16:20:21 1995
diff -u --recursive --new-file v1.3.16/linux/net/core/datagram.c linux/net/core/datagram.c
@@ -179,12 +179,16 @@
switch(sel_type)
{
case SEL_IN:
+ if (sk->err)
+ return 1;
+ if (sk->shutdown & RCV_SHUTDOWN)
+ return 1;
if (sk->type==SOCK_SEQPACKET && sk->state==TCP_CLOSE)
{
/* Connection closed: Wake up */
return(1);
}
- if (skb_peek(&sk->receive_queue) != NULL || sk->err != 0)
+ if (skb_peek(&sk->receive_queue) != NULL)
{ /* This appears to be consistent
with other stacks */
return(1);
@@ -192,10 +196,14 @@
return(0);
case SEL_OUT:
+ if (sk->err)
+ return 1;
+ if (sk->shutdown & SEND_SHUTDOWN)
+ return 1;
if (sk->type==SOCK_SEQPACKET && sk->state==TCP_SYN_SENT)
{
/* Connection still in progress */
- return(0);
+ break;
}
if (sk->prot && sk->prot->wspace(sk) >= MIN_WRITE_SPACE)
{
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