From: Radoslaw Pajak Date: Mon, 28 Oct 2013 09:03:38 +0000 (+0100) Subject: [daemon-fix][dev] address to start kdbus bus changed to 'kdbus:', kdbus added to... X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fdbus.git;a=commitdiff_plain;h=e634d502e476aa8889a71f0681da9312f10e002d [daemon-fix][dev] address to start kdbus bus changed to 'kdbus:', kdbus added to dbus-launch and autolaunch - address to start kdbus bus changed from 'kdbus' to 'kdbus:' - added kdbus bus creation option "--kdbus" to dbus-launch tool - added kdbus bus creation option to autolauch by adding scope=kdbus ("autolaunch:scope=kdbus" compiled as default when --enabel-kdbus-transport is given) - "Building kdbus support: yes/no" info added to configure Change-Id: I681d319733d067e7fc9d002ad370984ba469a342 Signed-off-by: Radoslaw Pajak --- diff --git a/bus/bus.c b/bus/bus.c index 4d9fe18..3b734a7 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -433,7 +433,7 @@ process_config_first_time_only (BusContext *context, if (address) { #ifdef ENABLE_KDBUS_TRANSPORT - if(!strcmp(_dbus_string_get_const_data(address), "kdbus")) + if(!strcmp(_dbus_string_get_const_data(address), "kdbus:")) { DBusBusType type; DBusServer* server; diff --git a/configure.ac b/configure.ac index 39ae389..d92acdd 100644 --- a/configure.ac +++ b/configure.ac @@ -1753,6 +1753,9 @@ elif test x$dbus_win = xyes; then # branch of the conditional because the default might conceivably # change (see #38201) DBUS_SESSION_BUS_CONNECT_ADDRESS="autolaunch:" +elif test x$enable_kdbus_transport = xyes; then + # Autolaunching kdbus bus instead of the ordinary socket + DBUS_SESSION_BUS_CONNECT_ADDRESS="autolaunch:scope=kdbus" else # The default on all other Unix platforms (notably Linux) # is to use auto-launching - this works a bit differently on Mac OS X @@ -1877,6 +1880,7 @@ echo " Building XML docs: ${enable_xml_docs} Building cache support: ${enable_userdb_cache} Building launchd support: ${have_launchd} + Building kdbus support: ${enable_kdbus_transport} Init scripts style: ${with_init_scripts} Abstract socket names: ${ac_cv_have_abstract_sockets} System bus socket: ${DBUS_SYSTEM_SOCKET} diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 1cb4a58..5db50e6 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -3513,6 +3513,11 @@ _dbus_get_autolaunch_address (const char *scope, ++i; argv[i] = "--close-stderr"; ++i; + if(strcmp(scope, "kdbus") == 0) + { + argv[i] = "--kdbus"; + ++i; + } argv[i] = NULL; ++i; diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index ea24f5c..a60db2a 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -823,6 +823,7 @@ main (int argc, char **argv) int autolaunch = FALSE; int requires_arg = FALSE; int close_stderr = FALSE; + int kdbus = FALSE; int i; int ret; int bus_pid_to_launcher_pipe[2]; @@ -859,6 +860,8 @@ main (int argc, char **argv) exit_with_session = TRUE; else if (strcmp (arg, "--close-stderr") == 0) close_stderr = TRUE; + else if (strcmp (arg, "--kdbus") == 0) + kdbus = TRUE; else if (strstr (arg, "--autolaunch=") == arg) { const char *s; @@ -1130,6 +1133,7 @@ main (int argc, char **argv) "--fork", "--print-pid", write_pid_fd_as_string, "--print-address", write_address_fd_as_string, + kdbus ? "--address=kdbus:" : "", config_file ? "--config-file" : "--session", config_file, /* has to be last in this varargs list */ NULL); @@ -1149,6 +1153,7 @@ main (int argc, char **argv) "--fork", "--print-pid", write_pid_fd_as_string, "--print-address", write_address_fd_as_string, + kdbus ? "--address=kdbus:" : "", config_file ? "--config-file" : "--session", config_file, /* has to be last in this varargs list */ NULL);