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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user