[gssdp] Check presence of MAN header
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] Check presence of MAN header
- Date: Wed, 29 Jun 2011 21:20:03 +0000 (UTC)
commit 387cb550ae175ab97321b99f26011ceb2b9ad159
Author: Jens Georg <mail jensge org>
Date: Wed Jun 29 18:52:38 2011 +0200
Check presence of MAN header
libgssdp/gssdp-resource-group.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libgssdp/gssdp-resource-group.c b/libgssdp/gssdp-resource-group.c
index a66ed65..da69303 100644
--- a/libgssdp/gssdp-resource-group.c
+++ b/libgssdp/gssdp-resource-group.c
@@ -740,7 +740,7 @@ message_received_cb (GSSDPClient *client,
gpointer user_data)
{
GSSDPResourceGroup *resource_group;
- const char *target, *mx_str, *version_str;
+ const char *target, *mx_str, *version_str, *man;
gboolean want_all;
int mx, version;
GList *l;
@@ -773,7 +773,14 @@ message_received_cb (GSSDPClient *client,
return;
}
-
+
+ man = soup_message_headers_get_one (headers, "MAN");
+ if (!man) {
+ g_warning ("Discovery request did not have a valid MAN header");
+
+ return;
+ }
+
mx = atoi (mx_str);
/* Extract version */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]