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

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

Advertisement

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

Filename:/net/x25/af_x25.c
Lines Added:9
Lines Deleted:12
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.1-ac14  2.4.1-ac15  2.4.1-ac16  2.4.1-ac17  2.4.1-ac18  2.4.1-ac19 

Location
[  2.4.1
  [  net
    [  x25
       o  af_x25.c

Patch

diff -u --recursive --new-file v2.4.0/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
--- v2.4.0/linux/net/x25/af_x25.c   Sun Dec 31 10:26:17 2000
+++ linux/net/x25/af_x25.c   Mon Jan 22 13:32:10 2001
@@ -1084,6 +1084,9 @@
    msg->msg_namelen = sizeof(struct sockaddr_x25);
 
    skb_free_datagram(sk, skb);
+   lock_sock(sk);
+   x25_check_rbuf(sk);
+   release_sock(sk);
 
    return copied;
 }
@@ -1258,8 +1261,8 @@
 } 
 
 struct net_proto_family x25_family_ops = {
-   AF_X25,
-   x25_create
+   family:      AF_X25,
+   create:      x25_create,
 };
 
 static struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
@@ -1286,18 +1289,13 @@
 SOCKOPS_WRAP(x25_proto, AF_X25);
 
 
-static struct packet_type x25_packet_type =
-{
-   0,      /* MUTTER ntohs(ETH_P_X25),*/
-   0,      /* copy */
-   x25_lapb_receive_frame,
-   NULL,
-   NULL,
+static struct packet_type x25_packet_type = {
+   type:      __constant_htons(ETH_P_X25),
+   func:      x25_lapb_receive_frame,
 };
 
 struct notifier_block x25_dev_notifier = {
-   x25_device_event,
-   0
+   notifier_call:   x25_device_event,
 };
 
 void x25_kill_by_neigh(struct x25_neigh *neigh)
@@ -1317,7 +1315,6 @@
 #endif /* MODULE */
    sock_register(&x25_family_ops);
 
-   x25_packet_type.type = htons(ETH_P_X25);
    dev_add_pack(&x25_packet_type);
 
    register_netdevice_notifier(&x25_dev_notifier);


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