patch-2.1.24 linux/net/x25/af_x25.c

Next file: linux/MAINTAINERS
Previous file: linux/net/rose/af_rose.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.23/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -652,10 +652,7 @@
 	x25_insert_socket(sk);
 
 	sk->zapped = 0;
-
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_bind: socket is bound\n");
-
+	SOCK_DEBUG(sk, "x25_bind: socket is bound\n");
 	return 0;
 }
 
@@ -937,14 +934,10 @@
 		sx25.sx25_family = AF_X25;
 		sx25.sx25_addr   = sk->protinfo.x25->dest_addr;
 	}
-
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: sendto: Addresses built.\n");
+	SOCK_DEBUG(sk, "x25_sendmsg: sendto: Addresses built.\n");
 
 	/* Build a packet */
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: sendto: building packet.\n");
-
+	SOCK_DEBUG(sk, "x25_sendmsg: sendto: building packet.\n");
 	if ((msg->msg_flags & MSG_OOB) && len > 32)
 		len = 32;
 
@@ -958,9 +951,7 @@
 	/*
 	 *	Put the data on the end
 	 */
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: Copying user data\n");
-
+	SOCK_DEBUG(sk, "x25_sendmsg: Copying user data\n");
 	skb->h.raw = skb_put(skb, len);
 	asmptr = skb->h.raw;
 
@@ -978,9 +969,7 @@
 	/*
 	 *	Push down the X.25 header
 	 */
- 	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: Building X.25 Header.\n");
-
+	SOCK_DEBUG(sk, "x25_sendmsg: Building X.25 Header.\n");
 	if (msg->msg_flags & MSG_OOB) {
 		if (sk->protinfo.x25->neighbour->extended) {
 			asmptr    = skb_push(skb, X25_STD_MIN_LEN);
@@ -1012,12 +1001,8 @@
 		if (qbit)
 			skb->data[0] |= X25_Q_BIT;
 	}
-
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: Built header.\n");
-
-	if (sk->debug)
-		printk(KERN_DEBUG "x25_sendmsg: Transmitting buffer\n");
+	SOCK_DEBUG(sk, "x25_sendmsg: Built header.\n");
+	SOCK_DEBUG(sk, "x25_sendmsg: Transmitting buffer\n");
 
 	if (sk->state != TCP_ESTABLISHED) {
 		kfree_skb(skb, FREE_WRITE);


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov