summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <hallski@src.gnome.org>2003-11-26 15:21:35 +0000
committerMikael Hallendal <hallski@src.gnome.org>2003-11-26 15:21:35 +0000
commit0e773593e220916e991406c0ce9c79c06a9c53d9 (patch)
treed540f88be01222d6ab7eecb0dfd51a285bb65643
parent76d6835903440252d2281377975e5673386e0b6e (diff)
downloadgconf-0e773593e220916e991406c0ce9c79c06a9c53d9.tar.gz
acquire service again
-rw-r--r--gconf/gconfd-dbus.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/gconf/gconfd-dbus.c b/gconf/gconfd-dbus.c
index 56efe743..77cebe59 100644
--- a/gconf/gconfd-dbus.c
+++ b/gconf/gconfd-dbus.c
@@ -182,25 +182,34 @@ gconfd_dbus_init (void)
{
GError *gerror = NULL;
DBusError error;
- const char *bus_address;
-
- bus_conn = dbus_bus_get_with_g_main (DBUS_BUS_SESSION, &gerror);
+
+ dbus_error_init (&error);
+ bus_conn = dbus_bus_get (DBUS_BUS_SESSION, &error);
if (!bus_conn)
{
gconf_log (GCL_ERR, _("Failed to connect to the D-BUS daemon: %s"),
- gerror->message);
+ error.message);
+ dbus_error_free (&error);
return FALSE;
}
- /*if (!dbus_bus_register (bus_conn, &error))
+ if (!dbus_bus_register (bus_conn, &error))
{
gconf_log (GCL_ERR, _("Failed to register client with the D-BUS bus daemon: %s"),
error.message);
dbus_error_free (&error);
return FALSE;
}
-*/
+
+ dbus_bus_acquire_service (bus_conn, GCONF_DBUS_SERVICE, 0, &error);
+ if (dbus_error_is_set (&error))
+ {
+ gconf_log (GCL_ERR, _("Failed to acquire gconf service"));
+ dbus_error_free (&error);
+ return FALSE;
+ }
+
if (!dbus_connection_register_object_path (bus_conn,
server_path,
&server_vtable,
@@ -209,17 +218,10 @@ gconfd_dbus_init (void)
gconf_log (GCL_ERR, _("Failed to register server object with the D-BUS bus daemon"));
return FALSE;
}
- /*
- dbus_bus_acquire_service (bus_conn, GCONF_DBUS_SERVICE, 0, &error);
- if (dbus_error_is_set (&error))
- {
- gconf_log (GCL_ERR, _("Failed to acquire gconf service"));
- dbus_error_free (&error);
- return FALSE;
- }
-*/
+
+
nr_of_connections = 1;
-/* dbus_connection_setup_with_g_main (bus_conn, NULL); */
+ dbus_connection_setup_with_g_main (bus_conn, NULL);
return TRUE;
}