summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-03 15:08:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-03 15:08:15 +0000
commit79c4527aa8bfbed3a35c2a6ad179f2c498dead16 (patch)
tree03a641eea9fd42eb57293836fb2005014e50656f /serial
parent842d3d53c6c3ae712c9d3a585a638ac4da343efa (diff)
Only unregister the manager path
Diffstat (limited to 'serial')
-rw-r--r--serial/manager.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 111995c8..ae9d90d5 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -1731,7 +1731,6 @@ static void proxy_path_free(gpointer data, gpointer udata)
static void manager_unregister(void *data)
{
char **dev;
- int i;
if (pending_connects) {
g_slist_foreach(pending_connects,
@@ -1754,19 +1753,8 @@ static void manager_unregister(void *data)
ports_paths = NULL;
}
- /* Unregister all paths in serial hierarchy */
- if (!dbus_connection_list_registered(connection, SERIAL_MANAGER_PATH,
- &dev))
- return;
-
- for (i = 0; dev[i]; i++) {
- char dev_path[MAX_PATH_LENGTH];
-
- snprintf(dev_path, sizeof(dev_path), "%s/%s", SERIAL_MANAGER_PATH,
- dev[i]);
-
- dbus_connection_destroy_object_path(connection, dev_path);
- }
+ g_dbus_unregister_interface(connection, SERIAL_MANAGER_PATH,
+ SERIAL_MANAGER_INTERFACE);
dbus_free_string_array(dev);
}