diff options
author | Dan Williams <dcbw@redhat.com> | 2008-07-29 20:27:09 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-07-29 20:27:09 +0000 |
commit | fa45b93a8ed60784e13e5c480603d56c46dc0998 (patch) | |
tree | 364c7fd726f0b7848de29138e9a7906a31c9ca4c /src | |
parent | 87209e98d7a3a3bcffc280365cde51097b265b6b (diff) | |
download | NetworkManager-fa45b93a8ed60784e13e5c480603d56c46dc0998.tar.gz |
2008-07-29 Dan Williams <dcbw@redhat.com>
* src/nm-gsm-device.c
- (automatic_registration_response, automatic_registration): recognize
denied registration and reorder responses
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3872 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src')
-rw-r--r-- | src/nm-gsm-device.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/nm-gsm-device.c b/src/nm-gsm-device.c index 218ddfc355..f291863901 100644 --- a/src/nm-gsm-device.c +++ b/src/nm-gsm-device.c @@ -301,22 +301,28 @@ automatic_registration_response (NMSerialDevice *device, { switch (reply_index) { case 0: - nm_info ("Registered on Home network"); - automatic_registration_get_network (NM_GSM_DEVICE (device)); + nm_warning ("Automatic registration failed: not registered and not searching."); + nm_device_state_changed (NM_DEVICE (device), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED); break; case 1: - nm_info ("Registered on Roaming network"); + nm_info ("Registered on Home network"); automatic_registration_get_network (NM_GSM_DEVICE (device)); break; case 2: NM_GSM_DEVICE_GET_PRIVATE (device)->pending_id = g_timeout_add (1000, automatic_registration_again, device); break; case 3: - nm_warning ("Automatic registration failed: not registered and not searching."); + nm_warning ("Automatic registration failed: registration denied."); nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED); break; + case 4: + nm_info ("Registered on Roaming network"); + automatic_registration_get_network (NM_GSM_DEVICE (device)); + break; case -1: nm_warning ("Automatic registration timed out"); nm_device_state_changed (NM_DEVICE (device), @@ -335,7 +341,7 @@ automatic_registration_response (NMSerialDevice *device, static void automatic_registration (NMGsmDevice *device) { - char *responses[] = { "+CREG: 0,1", "+CREG: 0,5", "+CREG: 0,2", "+CREG: 0,0", NULL }; + char *responses[] = { "+CREG: 0,0", "+CREG: 0,1", "+CREG: 0,2", "+CREG: 0,3", "+CREG: 0,5", NULL }; char *terminators[] = { "OK", "ERROR", "ERR", NULL }; modem_wait_for_reply (device, "AT+CREG?", 60, responses, terminators, automatic_registration_response); |