summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-12-11 16:21:38 -0600
committerDan Williams <dcbw@redhat.com>2014-12-11 16:22:32 -0600
commit7d5c0db53abacc9a5ca5a0f56d83dc49c2e64f90 (patch)
tree3aca4c5303af89547cf90a56465d713d63cec1be
parentda4a98bfbb2dd8ec36ce7abaa40e7f0491be58a3 (diff)
downloadNetworkManager-7d5c0db53abacc9a5ca5a0f56d83dc49c2e64f90.tar.gz
core: fix warning when releasing slaves on exit (rh #1169936)
NetworkManager[30304]: <info> (virbr0): bridge port virbr0-nic was detached NetworkManager[30304]: (devices/nm-device.c:962):nm_device_release_one_slave: runtime check failed: (reason == NM_DEVICE_STATE_REASON_NONE) NetworkManager[30304]: <info> (virbr0-nic): released from master virbr0 If the slave is removed, then the master is already cleaned up so NM doesn't need to do anything. 5dd48f fixed that but forgot to update the !configure case, causing the warning but no other problems. Fixes: 5dd48f7527c67b399ac144f594e035216771d61c
-rw-r--r--src/devices/nm-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 00f886bd3d..23f6d46935 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -959,7 +959,7 @@ nm_device_release_one_slave (NMDevice *self, NMDevice *slave, gboolean configure
}
if (!configure) {
- g_warn_if_fail (reason == NM_DEVICE_STATE_REASON_NONE);
+ 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 ();