about summary refs log tree commit diff
path: root/src/nm-device-wired.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-10-26 21:33:05 +0200
committerMichael Biebl <biebl@debian.org>2012-10-26 21:33:05 +0200
commit3e08ba570f7e146b67c0f9dfd17dc04987ebac18 (patch)
treeec993cb408a2edb4bb48ce86db4eaca09def6260 /src/nm-device-wired.c
parent74d97e718091bb137b480fb31d740fe20677812b (diff)
parent36cb2f364a821e1be50b23e03a18891ec55adb06 (diff)
Merge tag 'upstream/0.9.6.4' into experimental
Upstream version 0.9.6.4
Diffstat (limited to 'src/nm-device-wired.c')
-rw-r--r--src/nm-device-wired.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nm-device-wired.c b/src/nm-device-wired.c
index 60e5f262..c1122e55 100644
--- a/src/nm-device-wired.c
+++ b/src/nm-device-wired.c
@@ -147,6 +147,13 @@ carrier_action_defer_cb (gpointer user_data)
 	if (state == NM_DEVICE_STATE_UNAVAILABLE) {
 		if (priv->carrier)
 			nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER);
+		else {
+			/* clear any queued state changes if they wouldn't be valid when the
+			 * carrier is off.
+			 */
+			if (nm_device_queued_state_peek (NM_DEVICE (self)) >= NM_DEVICE_STATE_DISCONNECTED)
+				nm_device_queued_state_clear (NM_DEVICE (self));
+		}
 	} else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
 		if (!priv->carrier)
 			nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER);