Clear the existing service list first
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 28 May 2009 13:54:52 +0000 (16:54 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 28 May 2009 13:54:52 +0000 (16:54 +0300)
Services were getting accumulated in the description files each time
rygel was started. This change is to fix that.

src/rygel/rygel-media-server-factory.vala

index 9c105b1..9f7053d 100644 (file)
@@ -200,7 +200,10 @@ public class Rygel.MediaServerFactory {
     private void add_service_to_desc (Xml.Node    *service_list_node,
                                       string       plugin_name,
                                       ResourceInfo resource_info) {
-        // Create the service node
+        // Clear the existing service list first
+        service_list_node->set_content ("");
+
+        // Now create the service node
         Xml.Node *service_node = service_list_node->new_child (null, "service");
 
         service_node->new_child (null, "serviceType", resource_info.upnp_type);