diff options
-rw-r--r-- | src/nm-pacrunner-manager.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c index 88d82602ef..d4a5b5ab9a 100644 --- a/src/nm-pacrunner-manager.c +++ b/src/nm-pacrunner-manager.c @@ -458,21 +458,22 @@ nm_pacrunner_manager_remove (NMPacrunnerManager *self, const char *tag) if (nm_streq (config->tag, tag)) { if (priv->pacrunner) { if (!config->path) { - /* send() is pending: mark the config as removed - * so that the send() callback will remove it when - * the D-Bus path is known. */ + /* send() failed or is still pending. Mark the item as + * removed, so that we ask pacrunner to drop it when the + * send() completes. + */ config->removed = TRUE; config_unref (config); - return; + } else { + g_dbus_proxy_call (priv->pacrunner, + "DestroyProxyConfiguration", + g_variant_new ("(o)", config->path), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + priv->pacrunner_cancellable, + (GAsyncReadyCallback) pacrunner_remove_done, + config); } - g_dbus_proxy_call (priv->pacrunner, - "DestroyProxyConfiguration", - g_variant_new ("(o)", config->path), - G_DBUS_CALL_FLAGS_NO_AUTO_START, - -1, - priv->pacrunner_cancellable, - (GAsyncReadyCallback) pacrunner_remove_done, - config); } else config_unref (config); priv->configs = g_list_delete_link (priv->configs, list); |