mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 12:50:17 +01:00
pacrunner: remove failed and pending items from configuration list
If a configuration does not have a path it is because we are still sending it to pacrunner or because we failed to do so. In both cases, we have to remove the configuration from the list. Fixes:3ad89223d0(cherry picked from commitfad2cf0721)
This commit is contained in:
parent
0dead63886
commit
c6f2173f10
1 changed files with 13 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue