[maemo-commits] [maemo-commits] r18164 - projects/haf/trunk/dbus/debian/patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Apr 27 10:33:05 EEST 2009
Author: makarhun
Date: 2009-04-27 10:33:03 +0300 (Mon, 27 Apr 2009)
New Revision: 18164

Modified:
   projects/haf/trunk/dbus/debian/patches/40-prevent-autolaunch.patch
Log:
rework

Modified: projects/haf/trunk/dbus/debian/patches/40-prevent-autolaunch.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/40-prevent-autolaunch.patch	2009-04-27 07:25:00 UTC (rev 18163)
+++ projects/haf/trunk/dbus/debian/patches/40-prevent-autolaunch.patch	2009-04-27 07:33:03 UTC (rev 18164)
@@ -2,17 +2,21 @@
 ===================================================================
 --- dbus-1.2.12.orig/dbus/dbus-bus.c
 +++ dbus-1.2.12/dbus/dbus-bus.c
-@@ -393,6 +393,13 @@ internal_bus_get (DBusBusType  type,
-       return NULL;
-     }
+@@ -380,10 +380,17 @@ internal_bus_get (DBusBusType  type,
+   DBusConnection *connection;
+   BusData *bd;
+   DBusBusType address_type;
++  char *s = NULL;
  
-+  if ((type == DBUS_BUS_SESSION) && 
-+      (strcmp (bus_connection_addresses[DBUS_BUS_SESSION], DBUS_SESSION_BUS_DEFAULT_ADDRESS) == 0))
-+    {
-+      _DBUS_UNLOCK (bus);
-+      return NULL;
-+    }
+   _dbus_return_val_if_fail (type >= 0 && type < N_BUS_TYPES, NULL);
+   _dbus_return_val_if_error_is_set (error, NULL);
+ 
++  s = _dbus_getenv("DBUS_SESSION_BUS_ADDRESS");
++  if ( (type == DBUS_BUS_SESSION) &&
++       (s == NULL || *s == '\0') ) {
++    return NULL;
++  }
 +
-   /* We want to use the activation address even if the
-    * activating bus is the session or system bus,
-    * per the spec.
+   _DBUS_LOCK (bus);
+ 
+   if (!init_connections_unlocked ())


More information about the maemo-commits mailing list