[gupnp] Re: commit 7ebd4453f6377ed3c721b3af253cbef423bab0cc
- From: Sven Neumann <s neumann raumfeld com>
- To: "Zeeshan Ali (Khattak)" <zeenix gmail com>
- Cc: gupnp o-hand com
- Subject: [gupnp] Re: commit 7ebd4453f6377ed3c721b3af253cbef423bab0cc
- Date: Mon, 17 May 2010 16:55:13 +0200
On Mon, 2010-05-17 at 17:45 +0300, Zeeshan Ali (Khattak) wrote:
> > But we found a problem
> > with the initial state events from a UPNP service. The event in question
> > is from a ConnectionManager service which has three evented state
> > variables. The event looks like this:
> >
> > <?xml version="1.0"?>
> > <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
> > <e:property>
> > <SinkProtocolInfo>http-get:*:application/ogg</SinkProtocolInfo>
> > <SourceProtocolInfo/>
> > <CurrentConnectionIDs>0</CurrentConnectionIDs>
> > </e:property>
> > </e:propertyset>
> >
> > Unfortunately the GUPnPServiceProxy object only gets the notification of
> > the first variable (SinkProtocolInfo). The other two state variables are
> > ignored. We found that this is due to this commit from you:
>
> The commit is quite correct according toe UPnP device architecture
> doc, the event message is wrong. i-e for each property you have a
> separate 'property' node, otherwise the parent 'propertyset' would
> been completely redundant. Where do you get this event from?
It is generated by a GUPnPService object. If the commit in question is
correct, then the create_property_set() function in gupnp-service.c is
broken:
static char *
create_property_set (GQueue *queue)
{
NotifyData *data;
GString *str;
/* Compose property set */
str = xml_util_new_string ();
g_string_append (str,
"<?xml version=\"1.0\"?>"
"<e:propertyset xmlns:e="
"\"urn:schemas-upnp-org:event-1-0\">"
"<e:property>");
/* Add variables */
while ((data = g_queue_pop_head (queue))) {
xml_util_start_element (str, data->variable);
gvalue_util_value_append_to_xml_string (&data->value,
str);
xml_util_end_element (str, data->variable);
/* Cleanup */
notify_data_free (data);
}
g_string_append (str,
"</e:property>"
"</e:propertyset>");
/* Cleanup & return */
return g_string_free (str, FALSE);
}
Sven
--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]