summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-05-19 09:27:08 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2020-05-19 09:31:32 +0200
commita466bc4f1ffe78dab1f3e92b0f70e999fdee4c25 (patch)
treed88e62e6afa1efb46c70019cd309178ca0e0e5ab
parent0480448e662d7ae3e441ea4295e4c3d5c254c5f0 (diff)
downloadNetworkManager-bg/rh1778073.tar.gz
core: signal parent-active only when the parent AC is activatedbg/rh1778073
The parent-active signal is used by the manager to determine when the parent active-connection is ready and a connection that depend on it can proceed. The AC state could transition from ACTIVATING directly to DEACTIVATING; in such case we should not emit the signal but instead just stop watching the parent AC. Fixes: 6e382ea91d5f ('active-connection: add parent active connection tracking') https://bugzilla.redhat.com/show_bug.cgi?id=1778073
-rw-r--r--src/nm-active-connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 63dd891056..f1bb1ede81 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -996,7 +996,9 @@ parent_state_cb (NMActiveConnection *parent_ac,
return;
unwatch_parent (self, TRUE);
- g_signal_emit (self, signals[PARENT_ACTIVE], 0, parent_ac);
+
+ if (parent_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED)
+ g_signal_emit (self, signals[PARENT_ACTIVE], 0, parent_ac);
}
static void