1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
Description: Add some extra debugs for pesky SID/subscription problems
Author: Nick Leverton <nick@leverton.org>
Index: linux-igd-1.0+cvs20070630-libupnp6/gatedevice.c
===================================================================
--- linux-igd-1.0+cvs20070630-libupnp6.orig/gatedevice.c 2014-10-07 23:35:52.000000000 +0100
+++ linux-igd-1.0+cvs20070630-libupnp6/gatedevice.c 2014-10-07 23:35:53.000000000 +0100
@@ -75,12 +75,14 @@
ithread_mutex_lock(&DevMutex);
+ trace(3, "HandleSubscriptionRequest enter for UDN %s, expected UDN %s",
+ sr_event->UDN, gateUDN);
if (strcmp(sr_event->UDN, gateUDN) == 0)
{
// WAN Common Interface Config Device Notifications
if (strcmp(sr_event->ServiceId, "urn:upnp-org:serviceId:WANCommonIFC1") == 0)
{
- trace(3, "Recieved request to subscribe to WANCommonIFC1");
+ trace(3, "Received request to subscribe to WANCommonIFC1");
UpnpAddToPropertySet(&propSet, "PhysicalLinkStatus", "Up");
UpnpAcceptSubscriptionExt(deviceHandle, sr_event->UDN, sr_event->ServiceId,
propSet, sr_event->Sid);
@@ -98,9 +100,13 @@
UpnpAcceptSubscriptionExt(deviceHandle, sr_event->UDN, sr_event->ServiceId,
propSet, sr_event->Sid);
ixmlDocument_free(propSet);
+ } else {
+ trace(3, "HandleSubscriptionRequest unknown ServiceID %s",
+ sr_event->ServiceId);
}
}
ithread_mutex_unlock(&DevMutex);
+ trace(3, "HandleSubscriptionRequest exit, result=%d", 1);
return(1);
}
@@ -119,10 +125,13 @@
ithread_mutex_lock(&DevMutex);
+ trace(3, "HandleActionRequest enter for UDN %s, expected UDN %s",
+ ca_event->DevUDN, gateUDN);
if (strcmp(ca_event->DevUDN, gateUDN) == 0)
{
// Common debugging info, hopefully gets removed soon.
- trace(3, "ActionName = %s", ca_event->ActionName);
+ trace(3, "ActionName = %s, ServiceID = %s", ca_event->ActionName,
+ ca_event->ServiceID);
if (strcmp(ca_event->ServiceID, "urn:upnp-org:serviceId:WANIPConn1") == 0)
{
@@ -183,17 +192,24 @@
trace(1, "Invalid Action Request : %s",ca_event->ActionName);
result = InvalidAction(ca_event);
}
- }
+ } else {
+ trace(3, "HandleActionRequest unknown ServiceID %s",
+ ca_event->ServiceID);
+ }
+ } else {
+ trace(3, "HandleActionRequest UDN doesn't match");
}
ithread_mutex_unlock(&DevMutex);
+ trace(3, "HandleActionRequest exit, result=%d", result);
return (result);
}
// Default Action when we receive unknown Action Requests
int InvalidAction(struct Upnp_Action_Request *ca_event)
{
+ trace(1, "Invalid Action Request : %s", ca_event->ActionName);
ca_event->ErrCode = 401;
strcpy(ca_event->ErrStr, "Invalid Action");
ca_event->ActionResult = NULL;
@@ -282,7 +298,7 @@
//Immediatley Set connectionstatus to connected, and lastconnectionerror to none.
strcpy(ConnectionStatus,"Connected");
strcpy(LastConnectionError, "ERROR_NONE");
- trace(2, "RequestConnection recieved ... Setting Status to %s.", ConnectionStatus);
+ trace(2, "RequestConnection received ... Setting Status to %s.", ConnectionStatus);
// Build DOM Document with state variable connectionstatus and event it
UpnpAddToPropertySet(&propSet, "ConnectionStatus", ConnectionStatus);
|