From afe47b8d3a49ca48fde8a76855c34e4daf207cb2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 17 Aug 2008 23:41:41 +0000 Subject: [PATCH] 2008-08-17 Dan Williams * include/NetworkManager.h introspection/nm-device.xml src/nm-gsm-device.c - Finer-grained GSM registration failure error codes git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3978 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 7 +++++++ include/NetworkManager.h | 9 +++++++++ introspection/nm-device.xml | 19 +++++++++++++++++-- src/nm-gsm-device.c | 8 ++++---- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9ece0ab36..be9933fd06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-17 Dan Williams + + * include/NetworkManager.h + introspection/nm-device.xml + src/nm-gsm-device.c + - Finer-grained GSM registration failure error codes + 2008-08-17 Dan Williams * callouts/Makefile.am diff --git a/include/NetworkManager.h b/include/NetworkManager.h index 5414337e5c..825c22af5c 100644 --- a/include/NetworkManager.h +++ b/include/NetworkManager.h @@ -307,6 +307,15 @@ typedef enum { /* Failed to select the specified APN */ NM_DEVICE_STATE_REASON_GSM_APN_FAILED, + /* Not searching for networks */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING, + + /* Network registration denied */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED, + + /* Network registration timed out */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT, + /* Failed to register with the requested network */ NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED, diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index eb545a3c68..22b636cbc2 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -290,12 +290,27 @@ Failed to select the specified GSM APN. - + + + Not searching for networks. + + + + + Network registration was denied. + + + + + Network registration timed out. + + + Failed to register with the requested GSM network. - + PIN check failed. diff --git a/src/nm-gsm-device.c b/src/nm-gsm-device.c index c7367e4765..284597c2b8 100644 --- a/src/nm-gsm-device.c +++ b/src/nm-gsm-device.c @@ -241,7 +241,7 @@ manual_registration_done (NMSerialDevice *device, nm_warning ("Manual registration timed out"); nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED); + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT); break; default: nm_warning ("Manual registration failed"); @@ -304,7 +304,7 @@ automatic_registration_response (NMSerialDevice *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); + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING); break; case 1: nm_info ("Registered on Home network"); @@ -317,7 +317,7 @@ automatic_registration_response (NMSerialDevice *device, 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); + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED); break; case 4: nm_info ("Registered on Roaming network"); @@ -327,7 +327,7 @@ automatic_registration_response (NMSerialDevice *device, nm_warning ("Automatic registration timed out"); nm_device_state_changed (NM_DEVICE (device), NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED); + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT); break; default: nm_warning ("Automatic registration failed");