patch-2.3.36 linux/net/irda/iriap.c
Next file: linux/net/irda/iriap_event.c
Previous file: linux/net/irda/irda_device.c
Back to the patch index
Back to the overall index
- Lines: 97
- Date:
Wed Dec 29 17:08:55 1999
- Orig file:
v2.3.35/linux/net/irda/iriap.c
- Orig date:
Wed Dec 29 13:13:21 1999
diff -u --recursive --new-file v2.3.35/linux/net/irda/iriap.c linux/net/irda/iriap.c
@@ -150,7 +150,7 @@
{
struct iriap_cb *self;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, __FUNCTION__ "()\n");
self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC);
if (!self) {
@@ -199,6 +199,9 @@
del_timer(&self->watchdog_timer);
+ if (self->skb)
+ dev_kfree_skb(self->skb);
+
self->magic = 0;
kfree(self);
@@ -213,7 +216,7 @@
{
struct iriap_cb *entry;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, __FUNCTION__ "()\n");
ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;);
@@ -233,7 +236,7 @@
{
notify_t notify;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(2, __FUNCTION__ "()\n");
irda_notify_init(¬ify);
notify.connect_confirm = iriap_connect_confirm;
@@ -296,6 +299,7 @@
IRDA_DEBUG(4, __FUNCTION__ "(), disconnect as server\n");
iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
NULL);
+ iriap_close(self);
}
if (userdata)
@@ -609,8 +613,6 @@
break;
}
iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, skb);
-
- iriap_close(self);
}
/*
@@ -648,16 +650,14 @@
memcpy(attr, fp+n, attr_len); n+=attr_len;
attr[attr_len] = '\0';
+ /* We do not need the buffer anymore */
dev_kfree_skb(skb);
- /*
- * Now, do some advanced parsing! :-)
- */
IRDA_DEBUG(4, "LM-IAS: Looking up %s: %s\n", name, attr);
obj = irias_find_object(name);
if (obj == NULL) {
- IRDA_DEBUG(2, "LM-IAS: Object not found\n");
+ IRDA_DEBUG(2, "LM-IAS: Object %s not found\n", name);
iriap_getvaluebyclass_response(self, 0x1235, IAS_CLASS_UNKNOWN,
&missing);
return;
@@ -666,20 +666,16 @@
attrib = irias_find_attrib(obj, attr);
if (attrib == NULL) {
- IRDA_DEBUG(0, "LM-IAS: Attribute %s not found\n", attr);
+ IRDA_DEBUG(2, "LM-IAS: Attribute %s not found\n", attr);
iriap_getvaluebyclass_response(self, obj->id,
IAS_ATTRIB_UNKNOWN, &missing);
return;
}
- IRDA_DEBUG(4, "LM-IAS: found %s\n", attrib->name);
-
- /*
- * We have a match; send the value.
- */
+ /* We have a match; send the value. */
iriap_getvaluebyclass_response(self, obj->id, IAS_SUCCESS,
attrib->value);
-
+
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)