Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /net/x25/x25_subr.c

Filename:/net/x25/x25_subr.c
Lines Added:15
Lines Deleted:3
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.0-ac12  2.4.0-ac11  2.4.0-ac10 
(Following) 2.4.5-ac18  2.4.5-ac19  2.4.5-ac20  2.4.5-ac21  2.4.5-ac22  2.4.5-ac23 

Location
[  2.4.1
  [  net
    [  x25
       o  x25_subr.c

Patch

diff -u --recursive --new-file v2.4.0/linux/net/x25/x25_subr.c linux/net/x25/x25_subr.c
--- v2.4.0/linux/net/x25/x25_subr.c   Fri Apr 14 09:38:10 2000
+++ linux/net/x25/x25_subr.c   Wed Jan 24 15:28:36 2001
@@ -19,8 +19,6 @@
  *                 negotiation.
  */
 
-#include <linux/config.h>
-#if defined(CONFIG_X25) || defined(CONFIG_X25_MODULE)
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -351,4 +349,18 @@
    sk->dead = 1;
 }
 
-#endif
+/*
+ * Clear an own-rx-busy condition and tell the peer about this, provided
+ * that there is a significant amount of free receive buffer space available.
+ */
+void x25_check_rbuf(struct sock *sk)
+{
+   if (atomic_read(&sk->rmem_alloc) < (sk->rcvbuf / 2) &&
+       (sk->protinfo.x25->condition & X25_COND_OWN_RX_BUSY)) {
+      sk->protinfo.x25->condition &= ~X25_COND_OWN_RX_BUSY;
+      sk->protinfo.x25->condition &= ~X25_COND_ACK_PENDING;
+      sk->protinfo.x25->vl         = sk->protinfo.x25->vr;
+      x25_write_internal(sk, X25_RR);
+      x25_stop_timer(sk);
+   }
+}


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.