[gupnp] GUPNP PATCH for "create_property_set method" of "gupnp-service.c" file



Hi  All,

Looks like there is a bug in create_property_set method of gupnp-service.c file, one of UPnP test item fails because of this. I realized that each element should be bounded by <e:property> tag individually, below diff fixes this issue.

Does this make sense to you ?

--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -1702,21 +1720,24 @@ create_property_set (GQueue *queue)
         g_string_append (str,
                          "<?xml version=\"1.0\"?>"
                          "<e:propertyset xmlns:e="
-                                "\"urn:schemas-upnp-org:event-1-0\">"
-                         "<e:property>");
+                                "\"urn:schemas-upnp-org:event-1-0\">");

         /* Add variables */
         while ((data = g_queue_pop_head (queue))) {
+
+                g_string_append (str,
+                                "<e:property>");
+
                 xml_util_start_element (str, data->variable);
gvalue_util_value_append_to_xml_string (&data->value, str);
                 xml_util_end_element (str, data->variable);
-
+                g_string_append (str,
+                                "</e:property>");
                 /* Cleanup */
                 notify_data_free (data);
         }

         g_string_append (str,
-                         "</e:property>"
                          "</e:propertyset>");

         /* Cleanup & return */


Regards
Mehmet Sahin
--
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]