summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sack <asac@ubuntu.com>2009-10-30 19:52:14 +0100
committerAlexander Sack <asac@jwsdot.com>2009-10-30 19:58:30 +0100
commit82011dff04123df5634c3a17ceae19c76c67c9e0 (patch)
tree3553e9e73b1071b30d0a40be2425a010e8148b42
parent06a40dcf737e1732ad6c568b9533ed19fdc40bca (diff)
ppp: allow update of ppp secrets in all ACTIVATING stages (lp:432205)
Previously, ppp code would flip device state to _NEED_AUTH before asking for secrets update; this is not the case anymore after landing of f28a0df4a66e8f6c98327691c9c90df0604bbd28; hence, we need to allow update of secrets in all ACTIVATING stages. This patch updates this behaviour for all device classes with ppp support.
-rw-r--r--src/modem-manager/nm-modem-cdma.c2
-rw-r--r--src/modem-manager/nm-modem-gsm.c2
-rw-r--r--src/nm-device-ethernet.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/src/modem-manager/nm-modem-cdma.c b/src/modem-manager/nm-modem-cdma.c
index 9ba0a78279..30feb28a79 100644
--- a/src/modem-manager/nm-modem-cdma.c
+++ b/src/modem-manager/nm-modem-cdma.c
@@ -169,6 +169,8 @@ real_connection_secrets_updated (NMDevice *dev,
gboolean found = FALSE;
GSList *iter;
+ g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev)));
+
if (caller == SECRETS_CALLER_PPP) {
NMPPPManager *ppp_manager;
NMSettingCdma *s_cdma = NULL;
diff --git a/src/modem-manager/nm-modem-gsm.c b/src/modem-manager/nm-modem-gsm.c
index 0493d7476d..2bd8b231a9 100644
--- a/src/modem-manager/nm-modem-gsm.c
+++ b/src/modem-manager/nm-modem-gsm.c
@@ -335,6 +335,8 @@ real_connection_secrets_updated (NMDevice *dev,
gboolean found = FALSE;
GSList *iter;
+ g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev)));
+
if (caller == SECRETS_CALLER_PPP) {
NMPPPManager *ppp_manager;
NMSettingGsm *s_gsm = NULL;
diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c
index 6a75cba1fd..637107d6d9 100644
--- a/src/nm-device-ethernet.c
+++ b/src/nm-device-ethernet.c
@@ -632,8 +632,7 @@ real_connection_secrets_updated (NMDevice *dev,
gboolean valid = FALSE;
GSList *iter;
- if (nm_device_get_state (dev) != NM_DEVICE_STATE_NEED_AUTH)
- return;
+ g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev)));
/* PPPoE? */
if (caller == SECRETS_CALLER_PPP) {
@@ -663,6 +662,7 @@ real_connection_secrets_updated (NMDevice *dev,
/* Only caller could be ourselves for 802.1x */
g_return_if_fail (caller == SECRETS_CALLER_ETHERNET);
+ g_return_if_fail (nm_device_get_state (dev) == NM_DEVICE_STATE_NEED_AUTH);
for (iter = updated_settings; iter; iter = g_slist_next (iter)) {
const char *setting_name = (const char *) iter->data;