summaryrefslogtreecommitdiffstats
path: root/src/ussd.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-06-18 16:39:55 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-06-18 16:58:03 -0500
commit0c8aed38d7528c66c3d5ce2b7bacd2c449ac860e (patch)
treecda314cf910d0185a5d91529a328122dd05cbee2 /src/ussd.c
parent3fa13d4d25f2cd02079f58044b09115b20aaf48e (diff)
downloadofono-0c8aed38d7528c66c3d5ce2b7bacd2c449ac860e.tar.bz2
Fix logic flow in SS parser
Diffstat (limited to 'src/ussd.c')
-rw-r--r--src/ussd.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ussd.c b/src/ussd.c
index d2251c83..0691986d 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -308,6 +308,18 @@ static gboolean recognized_control_string(struct ofono_modem *modem,
ofono_debug("Got parse result: %d, %s, %s, %s, %s, %s, %s",
type, sc, sia, sib, sic, sid, dn);
+ /* A password change string needs to be treated separately
+ * because it uses a fourth SI and is thus not a valid
+ * control string. */
+ if (recognized_passwd_change_string(modem, type, sc,
+ sia, sib, sic, sid, dn, msg)) {
+ ret = TRUE;
+ goto out;
+ }
+
+ if (*sid != '\0');
+ goto out;
+
while ((l = g_slist_find_custom(l, sc,
ss_control_entry_find_by_service)) != NULL) {
struct ss_control_entry *entry = l->data;
@@ -320,12 +332,6 @@ static gboolean recognized_control_string(struct ofono_modem *modem,
l = l->next;
}
- /* A password change string needs to be treated separately
- * because it uses a fourth SI and is thus not a valid
- * control string. */
- if (recognized_passwd_change_string(modem, type, sc,
- sia, sib, sic, sid, dn, msg))
- goto out;
}
/* TODO: Handle all strings that control voice calls */