summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-18 23:46:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-01-18 23:46:24 +0000
commit1bc86936d90ea3b376047f8385e93023739a8576 (patch)
tree0e8796143cd45ccad096f569aa1d892293dc0e6e /daemon
parent8aa2613760bbe766d53f3f4b0683c3920aeff005 (diff)
Unregister interfaces on cleanup
Diffstat (limited to 'daemon')
-rw-r--r--daemon/database.c5
-rw-r--r--daemon/manager.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/daemon/database.c b/daemon/database.c
index 39d8c21c..01377d02 100644
--- a/daemon/database.c
+++ b/daemon/database.c
@@ -67,7 +67,7 @@ static DBusHandlerResult remove_service_record(DBusConnection *conn,
static DBusMethodVTable database_table[] = {
{ "AddServiceRecord", add_service_record,
- DBUS_TYPE_INVALID_AS_STRING, DBUS_TYPE_UINT32_AS_STRING },
+ DBUS_TYPE_BYTE_ARRAY_AS_STRING, DBUS_TYPE_UINT32_AS_STRING },
{ "RemoveServiceRecord", remove_service_record,
DBUS_TYPE_UINT32_AS_STRING, DBUS_TYPE_INVALID_AS_STRING },
{ }
@@ -93,6 +93,9 @@ void database_exit(void)
{
info("Stopping database interface");
+ dbus_connection_unregister_interface(connection,
+ SYSTEM_PATH, DATABASE_INTERFACE);
+
dbus_connection_unref(connection);
connection = NULL;
diff --git a/daemon/manager.c b/daemon/manager.c
index 7dbb7417..16447e59 100644
--- a/daemon/manager.c
+++ b/daemon/manager.c
@@ -94,7 +94,7 @@ static DBusHandlerResult default_adapter(DBusConnection *conn,
static DBusMethodVTable manager_table[] = {
{ "ListAdapters", list_adapters,
- DBUS_TYPE_INVALID_AS_STRING, DBUS_TYPE_ARRAY_AS_STRING },
+ DBUS_TYPE_INVALID_AS_STRING, DBUS_TYPE_STRING_ARRAY_AS_STRING },
{ "FindAdapter", find_adapter,
DBUS_TYPE_STRING_AS_STRING, DBUS_TYPE_STRING_AS_STRING },
{ "DefaultAdapter", default_adapter,
@@ -122,6 +122,9 @@ void manager_exit(void)
{
info("Stopping manager interface");
+ dbus_connection_unregister_interface(connection,
+ SYSTEM_PATH, MANAGER_INTERFACE);
+
dbus_connection_unref(connection);
connection = NULL;