summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-10-22 22:39:56 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-10-22 22:39:56 -0500
commite4a0ba26a03efe338066fef6cb682c737e83d0d6 (patch)
tree3f5cdf1db3b43eb6df68df84eea2800ef805e48d /src
parent6cabaec72674b7ad7b2299a3d0dcab72416758d6 (diff)
downloadofono-e4a0ba26a03efe338066fef6cb682c737e83d0d6.tar.bz2
stk: Nitpick some newline issues
Diffstat (limited to 'src')
-rw-r--r--src/stk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/stk.c b/src/stk.c
index a4137f22..82bc91e3 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -316,14 +316,17 @@ static struct stk_menu *stk_menu_create(const char *title,
ret->items[i].item_id = item->id;
text = NULL;
+
if (item_attrs && item_attrs->len) {
memcpy(attr.attributes, &item_attrs->list[i * 4], 4);
attr.len = 4;
text = dbus_apply_text_attributes(item->text, &attr);
}
+
if (!text)
text = strdup(item->text);
+
ret->items[i].text = text;
if (item_icon_ids && item_icon_ids->len)
@@ -816,7 +819,6 @@ static gboolean handle_command_set_idle_text(const struct stk_command *cmd,
if (!idle_mode_text) {
rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
-
return TRUE;
}
}
@@ -1214,7 +1216,6 @@ static gboolean handle_command_display_text(const struct stk_command *cmd,
if (!text) {
rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
-
return TRUE;
}
@@ -1383,7 +1384,6 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
if (!text) {
rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
-
return TRUE;
}
@@ -1415,6 +1415,7 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
err = stk_agent_request_digit(stk->current_agent, text,
&gi->icon_id, request_key_cb,
stk, NULL, timeout);
+
g_free(text);
if (err < 0) {
@@ -1485,7 +1486,6 @@ static gboolean handle_command_get_input(const struct stk_command *cmd,
if (!text) {
rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
-
return TRUE;
}
@@ -1503,6 +1503,7 @@ static gboolean handle_command_get_input(const struct stk_command *cmd,
gi->resp_len.max, hidden,
request_string_cb,
stk, NULL, timeout);
+
g_free(text);
if (err < 0) {