patch-2.3.16 linux/net/irda/discovery.c

Next file: linux/net/irda/ircomm/Makefile
Previous file: linux/net/irda/compressors/irda_deflate.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/net/irda/discovery.c linux/net/irda/discovery.c
@@ -6,7 +6,7 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Tue Apr  6 15:33:50 1999
- * Modified at:   Fri May 28 20:46:38 1999
+ * Modified at:   Mon Aug 23 09:48:40 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * Modified at:   Fri May 28  3:11 CST 1999
  * Modified by:   Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
@@ -66,7 +66,7 @@
 			discovery = (discovery_t *) hashbin_get_next(cachelog);
 			
 			if ((node->daddr == new->daddr) || 
-			    (strcmp(node->info, new->info) == 0))
+			    (strcmp(node->nickname, new->nickname) == 0))
 			{
 				/* This discovery is a previous discovery 
 				 * from the same device, so just remove it
@@ -122,7 +122,7 @@
  *    Go through all discoveries and expire all that has stayed to long
  *
  */
-void irlmp_expire_discoveries(hashbin_t *log, int saddr, int force)
+void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
 {
 	discovery_t *discovery, *curr;
 
@@ -163,7 +163,7 @@
 		DEBUG(0, "Discovery:\n");
 		DEBUG(0, "  daddr=%08x\n", discovery->daddr);
 		DEBUG(0, "  saddr=%08x\n", discovery->saddr); 
-		DEBUG(0, "  name=%s\n", discovery->info);
+		DEBUG(0, "  nickname=%s\n", discovery->nickname);
 
 		discovery = (discovery_t *) hashbin_get_next(log);
 	}
@@ -178,8 +178,8 @@
  */
 __u32 irlmp_find_device(hashbin_t *cachelog, char *name, __u32 *saddr)
 {
-	discovery_t *d;
 	unsigned long flags;
+	discovery_t *d;
 
 	spin_lock_irqsave(&irlmp->lock, flags);
 
@@ -188,9 +188,9 @@
 	while (d != NULL) {
 		DEBUG(1, "Discovery:\n");
 		DEBUG(1, "  daddr=%08x\n", d->daddr);
-		DEBUG(1, "  name=%s\n", d->info);
+		DEBUG(1, "  nickname=%s\n", d->nickname);
 		
-		if (strcmp(name, d->info) == 0) {
+		if (strcmp(name, d->nickname) == 0) {
 			*saddr = d->saddr;
 			
 			spin_unlock_irqrestore(&irlmp->lock, flags);
@@ -227,7 +227,7 @@
 	
 	discovery = (discovery_t *) hashbin_get_first(cachelog);
 	while ( discovery != NULL) {
-		len += sprintf(buf+len, "name: %s,", discovery->info);
+		len += sprintf(buf+len, "nickname: %s,", discovery->nickname);
 		
 		len += sprintf(buf+len, " hint: 0x%02x%02x", 
 			       discovery->hints.byte[0], 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)