patch-1.3.30 linux/net/core/sock.c
Next file: linux/net/ipv4/Makefile
Previous file: linux/net/core/skbuff.c
Back to the patch index
Back to the overall index
-  Lines: 32
 -  Date:
Wed Sep 27 13:07:33 1995
 -  Orig file: 
v1.3.29/linux/net/core/sock.c
 -  Orig date: 
Wed Sep 13 12:45:34 1995
 
diff -u --recursive --new-file v1.3.29/linux/net/core/sock.c linux/net/core/sock.c
@@ -487,8 +487,22 @@
 				return NULL;
 			}
 			
+#if 1
 			if( tmp <= sk->wmem_alloc)
+#else
+			/* ANK: Line above seems either incorrect
+			 *	or useless. sk->wmem_alloc has a tiny chance to change
+			 *	between tmp = sk->w... and cli(),
+			 *	but it might(?) change earlier. In real life
+			 *	it does not (I never seen the message).
+			 *	In any case I'd delete this check at all, or
+			 *	change it to:
+			 */
+			if (sk->wmem_alloc + size >= sk->sndbuf) 
+#endif
 			{
+				if (sk->wmem_alloc <= 0)
+				  printk("sock.c: Look where I am %ld<%ld\n", tmp, sk->wmem_alloc);
 				sk->socket->flags &= ~SO_NOSPACE;
 				interruptible_sleep_on(sk->sleep);
 				if (current->signal & ~current->blocked) 
@@ -539,7 +553,7 @@
 	{
 		sk->blog = 1;
 		if (sk->prot->rcv) 
-			sk->prot->rcv(skb, skb->dev, sk->opt,
+			sk->prot->rcv(skb, skb->dev, (struct options*)skb->proto_priv,
 				 skb->saddr, skb->len, skb->daddr, 1,
 				/* Only used for/by raw sockets. */
 				(struct inet_protocol *)sk->pair); 
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