summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-09-24 23:36:21 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-09-24 23:36:21 +0000
commit176c7e84d9db737cb58a381449799b13ef7b3fb4 (patch)
treea8cd09be35872e87c0bce00bab7d0ed475fad33b /serial
parent7a3857fd8a6fb641134f356b72c50f860c852ef4 (diff)
serial - RemovePort: remove path from ports_paths
Diffstat (limited to 'serial')
-rw-r--r--serial/manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/serial/manager.c b/serial/manager.c
index bb46d35c..36af5523 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -897,6 +897,7 @@ static DBusHandlerResult remove_port(DBusConnection *conn,
struct rfcomm_dev_info di;
DBusError derr;
const char *path;
+ GSList *l;
int16_t id;
dbus_error_init(&derr);
@@ -927,6 +928,12 @@ static DBusHandlerResult remove_port(DBusConnection *conn,
DBUS_TYPE_STRING, &path,
DBUS_TYPE_INVALID);
+ l = g_slist_find_custom(ports_paths, path, (GCompareFunc) strcmp);
+ if (l) {
+ g_free(l->data);
+ ports_paths = g_slist_remove(ports_paths, l->data);
+ }
+
return DBUS_HANDLER_RESULT_HANDLED;
}