[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82

Michael 'Mickey' Lauer mickey at vanille-media.de
Mon Feb 2 18:51:51 UTC 2009


The following commit has been merged in the master branch:
commit 8551825260f31baea9b8b3900d92e4e98d4c6a17
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Tue Jan 6 17:33:15 2009 +0100

    We now register one dbus connection per subsystem to prevent objects
    appearing on all bus names. If you previously only used the bus name
    'org.freesmartphone.frameworkd', you have to adjust your code.

diff --git a/ChangeLog b/ChangeLog
index 8bfd719..c5025a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-06	Michael Lauer	<mlauer at vanille-media.de>
+
+	* We now register one dbus connection per subsystem to prevent objects
+	  appearing on all bus names. If you previously only used the bus name
+	  'org.freesmartphone.frameworkd', you have to adjust your code.
+
 2009-01-03	Michael Lauer	<mlauer at vanille-media.de>
 
 	* Added new module kobject patterns that wraps uevent and rtnetlink notifications.
diff --git a/framework/subsystem.py b/framework/subsystem.py
index b2f0dd0..08695c2 100644
--- a/framework/subsystem.py
+++ b/framework/subsystem.py
@@ -27,12 +27,15 @@ class Subsystem( object ):
 #----------------------------------------------------------------------------#
     """
     Encapsulates a frameworkd subsystem exported via dbus.
+
+    Every subsystem has its dedicated dbus bus connection to
+    prevent all objects showing up on all bus names.
     """
     def __init__( self, name, bus, path, controller ):
         logger.debug( "subsystem %s created" % name )
         self.launchTime = time.time()
         self.name = name
-        self.bus = bus
+        self.bus = dbus.bus.BusConnection( dbus.bus.BUS_SYSTEM )
         self.path = path
         self.controller = controller
         self._objects = {}
@@ -119,7 +122,9 @@ class Subsystem( object ):
                 logger.debug( "module %s doesn't need additional busnames" % module )
 
             try:
-                for obj in factory( "%s.%s" % ( DBUS_BUS_NAME_PREFIX, self.name ), self.controller ):
+                # we used to pass the controller to the individual objects, we no longer do but
+                # pass ourself instead
+                for obj in factory( "%s.%s" % ( DBUS_BUS_NAME_PREFIX, self.name ), self ):
                     self._objects[obj.path] = obj
             except Exception, e:
                     logger.exception( "factory method not successfully completed for module %s" % module )

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list