diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-11-21 08:13:40 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-11-28 08:03:35 +0100 |
commit | 316fdb302621015cce3c404536af146bb91c400a (patch) | |
tree | a76c7b0b6a52d16ce172a8bca2d6c74720b30ba7 | |
parent | e377ce39d2e3dbe28b0dd3276cf93d0f6adc28b2 (diff) |
core/team: do not care about who owns the bus name
We don't need to care about the processes, just the bus name.
We also don't need to kill out process, it's just going to die by itself
if it fails to grab the bus name. On top of that, the process that grabbed
the name might not even be the same as we spawned, there could have been
a fork in between. Don't assume too much.
-rw-r--r-- | src/core/devices/team/nm-device-team.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 755d152ec5..9c6b1b070f 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -393,43 +393,6 @@ teamd_dbus_appeared(GDBusConnection *connection, g_return_if_fail(priv->teamd_dbus_watch); - _LOGI(LOGD_TEAM, "teamd appeared on D-Bus"); - - /* If another teamd grabbed the bus name while our teamd was starting, - * just ignore the death of our teamd and run with the existing one. - */ - if (priv->teamd_process_watch) { - gs_unref_variant GVariant *ret = NULL; - guint32 pid; - - ret = g_dbus_connection_call_sync(connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "GetConnectionUnixProcessID", - g_variant_new("(s)", name_owner), - NULL, - G_DBUS_CALL_FLAGS_NO_AUTO_START, - 2000, - NULL, - NULL); - - if (ret) { - g_variant_get(ret, "(u)", &pid); - if (pid != priv->teamd_pid) - teamd_cleanup(self, FALSE); - } else { - /* The process that registered on the bus died. If it's - * the teamd instance we just started, ignore the event - * as we already detect the failure through the process - * watch. If it's a previous instance that got killed, - * also ignore that as our new instance will register - * again. */ - _LOGI(LOGD_TEAM, "failed to determine D-Bus name owner, ignoring"); - return; - } - } - if (priv->kill_in_progress) { /* If we are currently killing teamd, we are not * interested in knowing when it becomes ready. */ |