summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-10-02 19:35:53 +0200
committerThomas Haller <thaller@redhat.com>2013-10-02 20:07:22 +0200
commite08687e1e2d9cb84b47398c68ff971dd063fa7ed (patch)
tree9b8717aae387832e35dd42cf5b4ecf9646e48636
parent67789cd4768912996be5c073976ae43c7c0e0e22 (diff)
downloadNetworkManager-e08687e1e2d9cb84b47398c68ff971dd063fa7ed.tar.gz
team: do not g_source_remove after g_child_watch_add signal was emitted
g_child_watch_add only emits one signal and gets automatically removed from the source. No need for double removal, so unset teamd_process_watch before calling teamd_cleanup. Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/devices/nm-device-team.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/devices/nm-device-team.c b/src/devices/nm-device-team.c
index e7931e4cee..1b3b0c0ab2 100644
--- a/src/devices/nm-device-team.c
+++ b/src/devices/nm-device-team.c
@@ -347,7 +347,10 @@ teamd_process_watch_cb (GPid pid, gint status, gpointer user_data)
NMDevice *dev = NM_DEVICE (user_data);
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (dev);
+ g_return_if_fail (priv->teamd_process_watch);
+
nm_log_info (LOGD_TEAM, "(%s): teamd died", nm_device_get_iface (dev));
+ priv->teamd_process_watch = 0;
priv->teamd_pid = 0;
teamd_cleanup (dev, TRUE);
}