patch-2.1.126 linux/net/netrom/nr_loopback.c
Next file: linux/net/netrom/nr_route.c
Previous file: linux/net/netrom/af_netrom.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Fri Oct 9 11:56:59 1998
- Orig file:
v2.1.125/linux/net/netrom/nr_loopback.c
- Orig date:
Tue Apr 14 14:29:26 1998
diff -u --recursive --new-file v2.1.125/linux/net/netrom/nr_loopback.c linux/net/netrom/nr_loopback.c
@@ -77,16 +77,16 @@
ax25_address *nr_dest;
struct device *dev;
- while ((skb = skb_dequeue(&loopback_queue)) != NULL) {
+ if ((skb = skb_dequeue(&loopback_queue)) != NULL) {
nr_dest = (ax25_address *)(skb->data + 7);
- if ((dev = nr_dev_get(nr_dest)) == NULL) {
- kfree_skb(skb);
- continue;
- }
+ dev = nr_dev_get(nr_dest);
- if (nr_rx_frame(skb, dev) == 0)
+ if (dev == NULL || nr_rx_frame(skb, dev) == 0)
kfree_skb(skb);
+
+ if (!skb_queue_empty(&loopback_queue) && !nr_loopback_running())
+ nr_set_loopback_timer();
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov