summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-26 12:15:11 -0800
committerDenis Kenzior <denkenz@gmail.com>2011-01-26 15:24:50 -0600
commit0be9e23a90e5862d7a006614129ac05f777c2838 (patch)
tree98823e8c289168f1ea47ee12bfe3799e0ec70960
parentdc3019031d4ba7623f3848ad24199b8a86eafff8 (diff)
downloadofono-0be9e23a90e5862d7a006614129ac05f777c2838.tar.bz2
stk: Fix issue in stk_alpha_id_set
Fixes the crash seen with the null alpha identifier. Also removed the icon check since the decision of whether to inform the user of the action is dependent entirely on whether the alpha identifier is provided by the UICC.
-rw-r--r--src/stk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stk.c b/src/stk.c
index 29d20876..b0be7b82 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -479,7 +479,12 @@ static void stk_alpha_id_set(struct ofono_stk *stk,
{
char *alpha = dbus_apply_text_attributes(text, attr);
- if (alpha || icon)
+ /*
+ * Currently, we are treating null data object(len = 0, no value part)
+ * and no alpha identifier cases equally. This may be changed once
+ * better idea is found out.
+ */
+ if (alpha != NULL)
stk_agent_display_action_info(stk->current_agent, alpha, icon);
g_free(alpha);