[maemo-commits] [maemo-commits] r8338 - in projects/haf/trunk/dbus/debian: . patches

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Mon Nov 27 14:06:31 EET 2006
Author: kihamala
Date: 2006-11-27 14:06:30 +0200 (Mon, 27 Nov 2006)
New Revision: 8338

Added:
   projects/haf/trunk/dbus/debian/patches/11-add-dbus-bus-get-activated-service.patch
Modified:
   projects/haf/trunk/dbus/debian/changelog
Log:
added Kuisma's patch


Modified: projects/haf/trunk/dbus/debian/changelog
===================================================================
--- projects/haf/trunk/dbus/debian/changelog	2006-11-27 11:54:55 UTC (rev 8337)
+++ projects/haf/trunk/dbus/debian/changelog	2006-11-27 12:06:30 UTC (rev 8338)
@@ -1,3 +1,10 @@
+dbus (1.0.0-osso4) experimental; urgency=low
+
+  * UNRELEASED
+  * Added patch from Kuisma Salonen to add dbus_bus_get_activated_service.
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Mon, 27 Nov 2006 14:06:26 +0200
+
 dbus (1.0.0-osso3) experimental; urgency=low
 
   * Added support for building with thumb instructions.

Added: projects/haf/trunk/dbus/debian/patches/11-add-dbus-bus-get-activated-service.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/11-add-dbus-bus-get-activated-service.patch	2006-11-27 11:54:55 UTC (rev 8337)
+++ projects/haf/trunk/dbus/debian/patches/11-add-dbus-bus-get-activated-service.patch	2006-11-27 12:06:30 UTC (rev 8338)
@@ -0,0 +1,60 @@
+diff -ru dbus-1.0.0/bus/activation.c dbus-1.0.0_modified/bus/activation.c
+--- dbus-1.0.0/bus/activation.c	2006-11-03 03:03:43.000000000 +0200
++++ dbus-1.0.0/bus/activation.c	2006-11-22 13:34:02.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <dbus/dbus-spawn.h>
+ #include <dbus/dbus-timeout.h>
+ #include <dbus/dbus-sysdeps.h>
++#include <stdlib.h>
+ #include <dirent.h>
+ #include <errno.h>
+ 
+@@ -1540,6 +1541,7 @@
+     }
+ 
+   _dbus_verbose ("Spawning %s ...\n", argv[0]);
++  putenv("_DBUS_ACTIVATED_SERVICE", service_name, 1);
+   if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv,
+                                           child_setup, activation, 
+                                           error))
+diff -ru dbus-1.0.0/dbus/dbus-bus.c dbus-1.0.0_modified/dbus/dbus-bus.c
+--- dbus-1.0.0/dbus/dbus-bus.c	2006-10-28 04:41:37.000000000 +0300
++++ dbus-1.0.0/dbus/dbus-bus.c	2006-11-22 13:45:25.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include "dbus-threads-internal.h"
+ #include "dbus-connection-internal.h"
+ #include <string.h>
++#include <stdlib.h>
+ 
+ /**
+  * @defgroup DBusBus Message bus APIs
+@@ -1446,4 +1447,17 @@
+   dbus_message_unref (msg);
+ }
+ 
++/**
++ * If the process was activated by a bus as, this function will
++ * return the service which was requested to be activated. Doesn't
++ * need a connection to any bus.
++ * 
++ * @returns a string containing the name of the service
++ */
++const char*
++dbus_bus_get_activated_service ()
++{
++  return getenv("_DBUS_ACTIVATED_SERVICE");
++}
++
+ /** @} */
+diff -ru dbus-1.0.0/dbus/dbus-bus.h dbus-1.0.0_modified/dbus/dbus-bus.h
+--- dbus-1.0.0/dbus/dbus-bus.h	2006-10-22 18:03:10.000000000 +0300
++++ dbus-1.0.0/dbus/dbus-bus.h	2006-11-22 13:37:04.000000000 +0200
+@@ -73,6 +73,8 @@
+                                            const char     *rule,
+                                            DBusError      *error);
+ 
++const char*           dbus_bus_get_activated_service (void);
++
+ /** @} */
+ 
+ DBUS_END_DECLS


More information about the maemo-commits mailing list