diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-02-17 10:40:18 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-03 09:34:24 -0400 |
commit | bd7b3190624a74be1c4ab4fb1e6a1609796a0708 (patch) | |
tree | f32ae9daefbf221843e5f3ca997446085acd3970 | |
parent | 6ea29e7a68a5fc23c7fd372aafa2d996f2cd5715 (diff) | |
download | NetworkManager-lr/beaker-fixes.tar.gz |
device: allow slave release with NONE reasonlr/beaker-fixes
It happens when a device is disconnected for a new activation.
Fixes: 600489003ff2eca33865a3d41abcc9fc03fd6bb1
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1395ccba60..d3ed95ac76 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1002,9 +1002,6 @@ nm_device_release_one_slave (NMDevice *self, NMDevice *slave, gboolean configure if (!configure) { g_warn_if_fail (reason == NM_DEVICE_STATE_REASON_NONE || reason == NM_DEVICE_STATE_REASON_REMOVED); reason = NM_DEVICE_STATE_REASON_NONE; - } else if (reason == NM_DEVICE_STATE_REASON_NONE) { - g_warn_if_reached (); - reason = NM_DEVICE_STATE_REASON_UNKNOWN; } nm_device_slave_notify_release (info->slave, reason); @@ -1703,8 +1700,7 @@ nm_device_slave_notify_release (NMDevice *self, NMDeviceStateReason reason) NMDeviceState new_state; const char *master_status; - if ( reason != NM_DEVICE_STATE_REASON_NONE - && priv->state > NM_DEVICE_STATE_DISCONNECTED + if ( priv->state > NM_DEVICE_STATE_DISCONNECTED && priv->state <= NM_DEVICE_STATE_ACTIVATED) { if (reason == NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED) { new_state = NM_DEVICE_STATE_FAILED; |