* [PATCH v3] stk: Fix issue in stk_alpha_id_set
@ 2011-01-26 20:15 Jeevaka Badrappan
2011-01-26 21:26 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Jeevaka Badrappan @ 2011-01-26 20:15 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
Fixes the crash seen with the null alpha identifier.
Also removed the icon check as icon will always be a valid pointer.
---
src/stk.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index 29d2087..b0be7b8 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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-26 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 20:15 [PATCH v3] stk: Fix issue in stk_alpha_id_set Jeevaka Badrappan
2011-01-26 21:26 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.