From 31fb97919cd7d95d1f9b23bd0c2428d8a19dc3e4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 6 Mar 2010 00:26:54 -0800 Subject: 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. --- src/mm-generic-gsm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2