mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-06 08:10:35 +01:00
team: check return value of g_dbus_connection_call_sync()
The call can fail; in such case assume that an existing teamd died and our instance will be able to continue. https://bugzilla.redhat.com/show_bug.cgi?id=1347015 (cherry picked from commit072358dad0) (cherry picked from commit90677c1c66)
This commit is contained in:
parent
e0805fc686
commit
dca9dec4b1
1 changed files with 11 additions and 3 deletions
|
|
@ -344,10 +344,18 @@ teamd_dbus_appeared (GDBusConnection *connection,
|
|||
2000,
|
||||
NULL,
|
||||
NULL);
|
||||
g_variant_get (ret, "(u)", &pid);
|
||||
|
||||
if (pid != priv->teamd_pid)
|
||||
teamd_cleanup (device, FALSE);
|
||||
if (ret) {
|
||||
g_variant_get (ret, "(u)", &pid);
|
||||
if (pid != priv->teamd_pid)
|
||||
teamd_cleanup (device, FALSE);
|
||||
} else {
|
||||
_LOGW (LOGD_TEAM, "failed to determine D-Bus name owner");
|
||||
/* If we can't determine the bus name owner, don't kill our
|
||||
* teamd instance. Hopefully another existing teamd just died and
|
||||
* our instance will be able to grab the bus name.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/* Grab a teamd control handle even if we aren't going to use it
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue