summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2007-07-24 12:19:59 +0000
committerRichard Hughes <richard@hughsie.com>2007-07-24 12:19:59 +0000
commit6ceffb591878e3a806d340ab07fbb12a2f74e79f (patch)
tree0a51f75b15826378a3e9c5e20bd2bda3ae3a92b1
parent153a2aed604b4b09e915397fe3b1db3f37e830e0 (diff)
2007-07-24 Richard Hughes <richard@hughsie.com>
* bus/bus.c: (process_config_first_time_only), (process_config_every_time), (bus_context_unref), (bus_context_get_servicehelper): * bus/bus.h: Add the concept of a service-helper and allow it's value to be read.
-rw-r--r--ChangeLog8
-rw-r--r--bus/bus.c22
-rw-r--r--bus/bus.h1
3 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 56c0f8da..0f83d791 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-07-24 Richard Hughes <richard@hughsie.com>
+ * bus/bus.c: (process_config_first_time_only),
+ (process_config_every_time), (bus_context_unref),
+ (bus_context_get_servicehelper):
+ * bus/bus.h:
+ Add the concept of a service-helper and allow it's value to be read.
+
+2007-07-24 Richard Hughes <richard@hughsie.com>
+
* bus/activation.c: (bus_activation_entry_unref),
(update_desktop_file_entry):
Add the concept of, and read the value of user from the desktop file.
diff --git a/bus/bus.c b/bus/bus.c
index cd1628cf..627e49d3 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -41,6 +41,7 @@ struct BusContext
DBusGUID uuid;
char *config_file;
char *type;
+ char *servicehelper;
char *address;
char *pidfile;
char *user;
@@ -262,7 +263,7 @@ process_config_first_time_only (BusContext *context,
{
DBusList *link;
DBusList **addresses;
- const char *user, *pidfile;
+ const char *user, *pidfile, *servicehelper;
char **auth_mechanisms;
DBusList **auth_mechanisms_list;
int len;
@@ -298,6 +299,11 @@ process_config_first_time_only (BusContext *context,
/* keep around the pid filename so we can delete it later */
context->pidfile = _dbus_strdup (pidfile);
+ /* we need to configure this so we can test the service helper */
+ servicehelper = bus_config_parser_get_servicehelper (parser);
+ if (servicehelper != NULL)
+ context->servicehelper = _dbus_strdup (servicehelper);
+
/* Build an array of auth mechanisms */
auth_mechanisms_list = bus_config_parser_get_mechanisms (parser);
@@ -402,6 +408,7 @@ process_config_every_time (BusContext *context,
{
DBusString full_address;
DBusList *link;
+ DBusList **dirs;
BusActivation *new_activation;
char *addr;
@@ -467,10 +474,12 @@ process_config_every_time (BusContext *context,
goto failed;
}
+ /* get the service directories */
+ dirs = bus_config_parser_get_service_dirs (parser);
+
/* Create activation subsystem */
new_activation = bus_activation_new (context, &full_address,
- bus_config_parser_get_service_dirs (parser),
- error);
+ dirs, error);
if (new_activation == NULL)
{
_DBUS_ASSERT_ERROR_IS_SET (error);
@@ -941,6 +950,7 @@ bus_context_unref (BusContext *context)
dbus_free (context->type);
dbus_free (context->address);
dbus_free (context->user);
+ dbus_free (context->servicehelper);
if (context->pidfile)
{
@@ -973,6 +983,12 @@ bus_context_get_address (BusContext *context)
return context->address;
}
+const char*
+bus_context_get_servicehelper (BusContext *context)
+{
+ return context->servicehelper;
+}
+
BusRegistry*
bus_context_get_registry (BusContext *context)
{
diff --git a/bus/bus.h b/bus/bus.h
index cd18c109..ad231040 100644
--- a/bus/bus.h
+++ b/bus/bus.h
@@ -82,6 +82,7 @@ dbus_bool_t bus_context_get_id (BusContext
DBusString *uuid);
const char* bus_context_get_type (BusContext *context);
const char* bus_context_get_address (BusContext *context);
+const char* bus_context_get_servicehelper (BusContext *context);
BusRegistry* bus_context_get_registry (BusContext *context);
BusConnections* bus_context_get_connections (BusContext *context);
BusActivation* bus_context_get_activation (BusContext *context);