mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
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
This commit is contained in:
parent
87209e98d7
commit
fa45b93a8e
|
@ -1,3 +1,9 @@
|
|||
2008-07-29 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-gsm-device.c
|
||||
- (automatic_registration_response, automatic_registration): recognize
|
||||
denied registration and reorder responses
|
||||
|
||||
2008-07-29 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-serial-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);
|
||||
|
|
Loading…
Reference in a new issue