[rygel] external: Create DBus connection when needed



commit 5957e35c67039a098146aba3daa9d91a9e4af373
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Jun 16 17:00:43 2010 +0300

    external: Create DBus connection when needed

 .../external/rygel-external-item-factory.vala      |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/external/rygel-external-item-factory.vala b/src/plugins/external/rygel-external-item-factory.vala
index 9ca7579..906e30c 100644
--- a/src/plugins/external/rygel-external-item-factory.vala
+++ b/src/plugins/external/rygel-external-item-factory.vala
@@ -38,8 +38,6 @@ public class Rygel.ExternalItemFactory {
                                    string                   host_ip,
                                    MediaContainer           parent)
                                    throws GLib.Error {
-        var connection = DBus.Bus.get (DBus.BusType.SESSION);
-
         var item = new MediaItem (id,
                                   parent,
                                   title,
@@ -60,6 +58,7 @@ public class Rygel.ExternalItemFactory {
 
         // FIXME: Get this value through the props until bug#602003 is fixed
         // value = props.lookup ("URLs");
+        var connection = DBus.Bus.get (DBus.BusType.SESSION);
         var item_iface = connection.get_object (service_name, id)
                          as ExternalMediaItem;
         string[] uris = item_iface.urls;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]