[gssdp] Really ignore invalid MAN header
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] Really ignore invalid MAN header
- Date: Fri, 16 Nov 2012 12:25:25 +0000 (UTC)
commit ccb4ebb592f94fc0365462c0f5920523f022c881
Author: Jens Georg <mail jensge org>
Date: Fri Nov 16 13:25:10 2012 +0100
Really ignore invalid MAN header
libgssdp/gssdp-resource-group.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgssdp/gssdp-resource-group.c b/libgssdp/gssdp-resource-group.c
index 0c489cc..262a865 100644
--- a/libgssdp/gssdp-resource-group.c
+++ b/libgssdp/gssdp-resource-group.c
@@ -44,6 +44,8 @@ G_DEFINE_TYPE (GSSDPResourceGroup,
gssdp_resource_group,
G_TYPE_OBJECT);
+#define DEFAULT_MAN_HEADER "\"ssdp:discover\""
+
struct _GSSDPResourceGroupPrivate {
GSSDPClient *client;
@@ -774,12 +776,12 @@ message_received_cb (GSSDPClient *client,
mx_str = soup_message_headers_get_one (headers, "MX");
if (!mx_str || atoi (mx_str) <= 0) {
g_warning ("Discovery request did not have a valid MX header");
-
+
return;
}
man = soup_message_headers_get_one (headers, "MAN");
- if (!man) {
+ if (!man || strcmp (man, DEFAULT_MAN_HEADER) != 0) {
g_warning ("Discovery request did not have a valid MAN header");
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]