aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-31 13:16:59 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-31 14:25:20 (GMT)
commit3bde8280984b3a289a94abad34b81520089e9905 (patch)
tree3313edca2e2bbd60d134dddee31a12d9ef9d2006 /src/wps
parent96038a5f85cbffc06e09b779caf7f053e042b5f5 (diff)
downloadhostap-3bde8280984b3a289a94abad34b81520089e9905.zip
hostap-3bde8280984b3a289a94abad34b81520089e9905.tar.gz
hostap-3bde8280984b3a289a94abad34b81520089e9905.tar.bz2
WPS: Print subscription UUID in debug log in more places
This makes it easier to debug subscription issues. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_upnp.c7
-rw-r--r--src/wps/wps_upnp_web.c13
2 files changed, 15 insertions, 5 deletions
diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c
index 933d734..44318e0 100644
--- a/src/wps/wps_upnp.c
+++ b/src/wps/wps_upnp.c
@@ -695,6 +695,7 @@ struct subscription * subscription_start(struct upnp_wps_device_sm *sm,
struct subscription *s;
time_t now = time(NULL);
time_t expire = now + UPNP_SUBSCRIBE_SEC;
+ char str[80];
/* Get rid of expired subscriptions so we have room */
subscription_list_age(sm, now);
@@ -743,8 +744,10 @@ struct subscription * subscription_start(struct upnp_wps_device_sm *sm,
subscription_destroy(s);
return NULL;
}
- wpa_printf(MSG_DEBUG, "WPS UPnP: Subscription %p started with %s",
- s, callback_urls);
+ uuid_bin2str(s->uuid, str, sizeof(str));
+ wpa_printf(MSG_DEBUG,
+ "WPS UPnP: Subscription %p (SID %s) started with %s",
+ s, str, callback_urls);
/* Schedule sending this */
event_send_all_later(sm);
return s;
diff --git a/src/wps/wps_upnp_web.c b/src/wps/wps_upnp_web.c
index b1cf571..3ec48fc 100644
--- a/src/wps/wps_upnp_web.c
+++ b/src/wps/wps_upnp_web.c
@@ -1214,18 +1214,25 @@ static void web_connection_parse_unsubscribe(struct upnp_wps_device_sm *sm,
}
if (got_uuid) {
+ char str[80];
+
+ uuid_bin2str(uuid, str, sizeof(str));
+
s = subscription_find(sm, uuid);
if (s) {
struct subscr_addr *sa;
sa = dl_list_first(&s->addr_list, struct subscr_addr,
list);
- wpa_printf(MSG_DEBUG, "WPS UPnP: Unsubscribing %p %s",
- s, (sa && sa->domain_and_port) ?
+ wpa_printf(MSG_DEBUG,
+ "WPS UPnP: Unsubscribing %p (SID %s) %s",
+ s, str, (sa && sa->domain_and_port) ?
sa->domain_and_port : "-null-");
dl_list_del(&s->list);
subscription_destroy(s);
} else {
- wpa_printf(MSG_INFO, "WPS UPnP: Could not find matching subscription to unsubscribe");
+ wpa_printf(MSG_INFO,
+ "WPS UPnP: Could not find matching subscription to unsubscribe (SID %s)",
+ str);
ret = HTTP_PRECONDITION_FAILED;
goto send_msg;
}