patch-2.2.7 linux/net/irda/af_irda.c

Next file: linux/net/irda/discovery.c
Previous file: linux/net/ipv6/udp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.6/linux/net/irda/af_irda.c linux/net/irda/af_irda.c
@@ -6,7 +6,7 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Sun May 31 10:12:43 1998
- * Modified at:   Wed Apr  7 17:32:27 1999
+ * Modified at:   Thu Apr 22 12:08:04 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * Sources:       af_netroom.c, af_ax25.c, af_rose.c, af_x25.c etc.
  * 
@@ -39,6 +39,7 @@
 #include <net/irda/iriap.h>
 #include <net/irda/irias_object.h>
 #include <net/irda/irttp.h>
+#include <net/irda/discovery.h>
 
 extern int  irda_init(void);
 extern void irda_cleanup(void);
@@ -237,8 +238,8 @@
  *    Got answer from remote LM-IAS
  *
  */
-static void irda_get_value_confirm(__u16 obj_id, struct ias_value *value, 
-				   void *priv)
+static void irda_get_value_confirm(int result, __u16 obj_id, 
+				   struct ias_value *value, void *priv)
 {
 	struct irda_sock *self;
 	
@@ -251,11 +252,14 @@
 		return;
 
 	/* Check if request succeeded */
-	if (!value) {
+	if (result != IAS_SUCCESS) {
 		DEBUG(0, __FUNCTION__ "(), IAS query failed!\n");
 
+		self->errno = result;
+
 		/* Wake up any processes waiting for result */
 		wake_up_interruptible(&self->ias_wait);
+
 		return;
 	}
 
@@ -673,7 +677,7 @@
 	self->mask = 0xffff;
 	self->rx_flow = self->tx_flow = FLOW_START;
 	self->max_sdu_size_rx = SAR_DISABLE; /* Default value */
-	self->nslots = 6; /* Default for now */
+	self->nslots = DISCOVERY_DEFAULT_SLOTS;
 
 	/* Notify that we are using the irda module, so nobody removes it */
 	irda_mod_inc_use_count();
@@ -857,6 +861,12 @@
 	return copied;
 }
 
+/*
+ * Function irda_shutdown (sk, how)
+ *
+ *    
+ *
+ */
 static int irda_shutdown( struct socket *sk, int how)
 {
 	DEBUG( 0, __FUNCTION__ "()\n");
@@ -866,6 +876,12 @@
 }
 
 
+/*
+ * Function irda_poll (file, sock, wait)
+ *
+ *    
+ *
+ */
 unsigned int irda_poll(struct file *file, struct socket *sock, 
 		       struct poll_table_struct *wait)
 {

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