From 096f87e16034e216f06da97c04deb3821f68b95f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 9 Feb 2010 23:50:26 -0800 Subject: [PATCH] modem: ignore Enabled property changes while activating Due to various ordering issues in ModemManager, when the Enable() call fails because a PIN is required, MM will disable the modem and *then* complete the dbus call. That means that NM gets the Enable property change before the Enable() call completes, and NM would then transition the device to DISCONNECTED. What we really want to do is get the response from MM and then figure out whether to fail activation or get secrets, not go to DISCONNECTED. To fix this, ignore Enabled property changes to FALSE while activating so we can handle it ourselves. There are still a few fixes left in nm-applet to make the secrets request for PINs work on-the-fly, but saved in the connection works fine. --- src/modem-manager/nm-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index 4788673c1..5b001eec5 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -622,7 +622,7 @@ modem_properties_changed (DBusGProxy *proxy, if (priv->mm_enabled == FALSE) { state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - if (IS_ACTIVATING_STATE (state) || (state == NM_DEVICE_STATE_ACTIVATED)) { + if (state == NM_DEVICE_STATE_ACTIVATED) { nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE);