From 346a1dc9574e3230073f45086316bc667cc9c02f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 24 Jul 2012 12:12:18 -0500 Subject: [PATCH] core: suppress a warning when a connection is assumed When NM takes over a device's existing connection, it'll jump right from "unavailable" to "ip-config" states, thus leading to the warning. --- src/nm-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-device.c b/src/nm-device.c index 1c84ec1a07..9432204dbc 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -2478,7 +2478,8 @@ nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self) g_return_if_fail (priv->act_request); state = nm_device_get_state (self); - g_warn_if_fail (state >= NM_DEVICE_STATE_PREPARE && state <= NM_DEVICE_STATE_NEED_AUTH); + if (nm_act_request_get_assumed (priv->act_request) == FALSE) + g_warn_if_fail (state >= NM_DEVICE_STATE_PREPARE && state <= NM_DEVICE_STATE_NEED_AUTH); /* Add the interface to the specified firewall zone */ connection = nm_device_get_connection (self);