diff options
| author | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:44 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2012-06-29 20:12:44 +0200 |
| commit | 867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (patch) | |
| tree | 7c698b403882736ab70c3efd524c3460f08c391c /src/nm-device-modem.c | |
| parent | de06e5715e780baade318f3490ac7a4c9ce84e32 (diff) | |
Imported Upstream version 0.9.5.95 upstream/0.9.5.95
Diffstat (limited to 'src/nm-device-modem.c')
| -rw-r--r-- | src/nm-device-modem.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c index 7f81e981..e7cd9259 100644 --- a/src/nm-device-modem.c +++ b/src/nm-device-modem.c @@ -311,11 +311,12 @@ real_set_enabled (NMDevice *device, gboolean enabled) nm_modem_set_mm_enabled (priv->modem, enabled); if (enabled == FALSE) { - state = nm_device_get_state (NM_DEVICE (device)); - if (state == NM_DEVICE_STATE_ACTIVATED) { - nm_device_state_changed (NM_DEVICE (device), + state = nm_device_get_state (device); + if (nm_device_is_activating (device) || state == NM_DEVICE_STATE_ACTIVATED) { + /* user-initiated action, hence DISCONNECTED not FAILED */ + nm_device_state_changed (device, NM_DEVICE_STATE_DISCONNECTED, - NM_DEVICE_STATE_REASON_NONE); + NM_DEVICE_STATE_REASON_USER_REQUESTED); } } } |