Re: [PATCH] Only reply if a valid MX header is present
- From: Zachary Goldberg <zach zachgoldberg com>
- To: Jens Georg <mail jensge org>
- Cc: gupnp-list gnome org
- Subject: Re: [PATCH] Only reply if a valid MX header is present
- Date: Wed, 1 Jun 2011 11:52:42 -0400
Out of sheer curiosity -- can you share summary statistics of
GUPnP/Rygel's UPnP/DLNA compliance to date?
On Wed, Jun 1, 2011 at 11:45 AM, Jens Georg <mail jensge org> wrote:
> Fixes UPnP CTT test UDA-1.2.9
> ---
> libgssdp/gssdp-resource-group.c | 11 +++++++----
> 1 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/libgssdp/gssdp-resource-group.c b/libgssdp/gssdp-resource-group.c
> index 231cbc5..78f1fa6 100644
> --- a/libgssdp/gssdp-resource-group.c
> +++ b/libgssdp/gssdp-resource-group.c
> @@ -768,10 +768,13 @@ message_received_cb (GSSDPClient *client,
>
> /* Extract MX */
> mx_str = soup_message_headers_get_one (headers, "MX");
> - if (mx_str)
> - mx = atoi (mx_str);
> - else
> - mx = SSDP_DEFAULT_MX;
> + if (!mx_str || atoi (mx_str) == 0) {
> + g_warning ("Discovery request did not have a valid MX header");
> +
> + return;
> + }
> +
> + mx = atoi (mx_str);
>
> /* Extract version */
> version_str = get_version_for_target ((char *)target);
> --
> 1.7.5.2
>
> _______________________________________________
> gupnp-list mailing list
> gupnp-list gnome org
> http://mail.gnome.org/mailman/listinfo/gupnp-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]