summaryrefslogtreecommitdiffstats
path: root/serial/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'serial/manager.c')
-rw-r--r--serial/manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 1c913351..eee5d1aa 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -1524,6 +1524,7 @@ static DBusHandlerResult list_proxies(DBusConnection *conn,
static DBusHandlerResult remove_proxy(DBusConnection *conn,
DBusMessage *msg, void *data)
{
+ struct proxy *prx = NULL;
const char *path;
GSList *l;
DBusError derr;
@@ -1541,6 +1542,11 @@ static DBusHandlerResult remove_proxy(DBusConnection *conn,
if (!l)
return err_does_not_exist(conn, msg, "Invalid proxy path");
+ /* Remove from storage */
+ if (dbus_connection_get_object_user_data(conn,
+ path, (void *) &prx) && prx)
+ proxy_delete(&prx->src, prx->tty);
+
g_free(l->data);
proxies_paths = g_slist_remove(proxies_paths, l->data);