From ccb4ebb592f94fc0365462c0f5920523f022c881 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Fri, 16 Nov 2012 13:25:10 +0100 Subject: [PATCH] Really ignore invalid MAN header --- libgssdp/gssdp-resource-group.c | 6 ++++-- 1 file 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; -- 2.7.4