aboutsummaryrefslogtreecommitdiff
path: root/contrib/wpa/src/wps/wps_upnp_web.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wpa/src/wps/wps_upnp_web.c')
-rw-r--r--contrib/wpa/src/wps/wps_upnp_web.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/contrib/wpa/src/wps/wps_upnp_web.c b/contrib/wpa/src/wps/wps_upnp_web.c
index b1cf571d8acb..d5b0b5b26e9d 100644
--- a/contrib/wpa/src/wps/wps_upnp_web.c
+++ b/contrib/wpa/src/wps/wps_upnp_web.c
@@ -1003,6 +1003,8 @@ static void web_connection_parse_subscribe(struct upnp_wps_device_sm *sm,
ret = HTTP_INTERNAL_SERVER_ERROR;
goto error;
}
+ if (len > 0 && callback_urls[len - 1] == '\r')
+ callback_urls[len - 1] = '\0';
continue;
}
/* SID is only for renewal */
@@ -1214,18 +1216,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;
}