summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-16 23:48:09 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-20 00:42:47 +0300
commit205c6788d7a34704e36b23f1a93d89e9b986266a (patch)
treec653f8a118d437a8364686f7b7a45a020d7cbf8d /config
parent85ac2f16abe9f6e88b4e71609da334d336a9a600 (diff)
config/dbus: properly initialise vtable
Properly initialise the vtable, so we don't end up with an unregister_function pointing to god knows where.
Diffstat (limited to 'config')
-rw-r--r--config/config.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/config/config.c b/config/config.c
index a50302f2f..4d12a0758 100644
--- a/config/config.c
+++ b/config/config.c
@@ -251,7 +251,7 @@ configInitialise()
{
DBusConnection *bus = NULL;
DBusError error;
- DBusObjectPathVTable vtable;
+ DBusObjectPathVTable vtable = { .message_function = configMessage };
configConnection = NULL;
@@ -294,7 +294,6 @@ configInitialise()
return;
}
- vtable.message_function = configMessage;
snprintf(busobject, sizeof(busobject), "/org/x/config/%d", atoi(display));
if (!dbus_connection_register_object_path(bus, busobject, &vtable, bus)) {
configfd = -1;
@@ -319,10 +318,7 @@ configFini()
if (configConnection) {
dbus_error_init(&error);
- /* This causes a segfault inside libdbus. Sigh. */
-#if 0
dbus_connection_unregister_object_path(configConnection, busobject);
-#endif
dbus_bus_remove_match(configConnection, MATCH_RULE, &error);
dbus_bus_release_name(configConnection, busname, &error);
dbus_connection_unref(configConnection);