aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-06 00:26:54 -0800
committerDan Williams <dcbw@redhat.com>2010-03-06 00:26:54 -0800
commit31fb97919cd7d95d1f9b23bd0c2428d8a19dc3e4 (patch)
tree71bf79ae871105ed53eeb0a70bfe95e142b83706
parent3232a3f7d6d01400c4ed9acb6692fa119b7720b2 (diff)
gsm: fix simple state machine network registration after 407abc65c6ccd802ce8456e5a63e68fab1c7d0a1
Got the logic wrong in that commit. Fix it. Network registration should always be run since it handles polling for registration state if needed before continuing.
-rw-r--r--src/mm-generic-gsm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index eb1c6756..84d4136c 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -2081,12 +2081,10 @@ simple_state_machine (MMModem *modem, GError *error, gpointer user_data)
case SIMPLE_STATE_REGISTER:
next_state = SIMPLE_STATE_SET_APN;
str = simple_get_string_property (info, "network_id", &info->error);
- if (str || info->error) {
- if (str)
- mm_modem_gsm_network_register (MM_MODEM_GSM_NETWORK (modem), str, simple_state_machine, info);
- break;
- }
- /* Fall through if no explicit network registration is required */
+ if (info->error)
+ str = NULL;
+ mm_modem_gsm_network_register (MM_MODEM_GSM_NETWORK (modem), str, simple_state_machine, info);
+ break;
case SIMPLE_STATE_SET_APN:
next_state = SIMPLE_STATE_CONNECT;
str = simple_get_string_property (info, "apn", &info->error);