patch-1.3.60 linux/net/core/sock.c
Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/skbuff.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Wed Feb 7 08:55:44 1996
- Orig file:
v1.3.59/linux/net/core/sock.c
- Orig date:
Wed Dec 27 09:12:14 1995
diff -u --recursive --new-file v1.3.59/linux/net/core/sock.c linux/net/core/sock.c
@@ -67,6 +67,7 @@
* 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.
+ * Alan Cox : Allow NULL arguments on some SO_ opts
*
* To Fix:
*
@@ -125,6 +126,19 @@
int err;
struct linger ling;
+ /*
+ * Options without arguments
+ */
+
+#ifdef SO_DONTLINGER /* Compatibility item... */
+ switch(optname)
+ {
+ case SO_DONTLINGER:
+ sk->linger=0;
+ return 0;
+ }
+#endif
+
if (optval == NULL)
return(-EINVAL);
@@ -508,7 +522,7 @@
if (sk->wmem_alloc + size >= sk->sndbuf)
#endif
{
- if (sk->wmem_alloc <= 0)
+ 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);
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