summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-11-03 22:37:17 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-11-04 10:25:42 -0500
commit3436c58fac7369fa34cb403b2ae86f4c334565b8 (patch)
treecd856f89b92e6390a9d7f02a78d678c66af8a324 /src/stk.c
parent4a2111347facc1165903e32e09b6cc0959145f65 (diff)
downloadofono-3436c58fac7369fa34cb403b2ae86f4c334565b8.tar.bz2
sms: Refactor __ofono_sms_txq_submit
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stk.c b/src/stk.c
index 0a2c1690..230c9234 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -792,6 +792,7 @@ static gboolean handle_command_send_sms(const struct stk_command *cmd,
struct ofono_atom *sms_atom;
struct ofono_sms *sms;
GSList msg_list;
+ struct ofono_uuid uuid;
sms_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SMS);
@@ -807,13 +808,13 @@ static gboolean handle_command_send_sms(const struct stk_command *cmd,
msg_list.data = (void *) &cmd->send_sms.gsm_sms;
msg_list.next = NULL;
- if (__ofono_sms_txq_submit(sms, &msg_list, 0, NULL, send_sms_submit_cb,
- stk->extern_req, g_free) < 0) {
- g_free(stk->extern_req);
+ if (__ofono_sms_txq_submit(sms, &msg_list, 0, &uuid, NULL, NULL) < 0) {
rsp->result.type = STK_RESULT_TYPE_TERMINAL_BUSY;
return TRUE;
}
+ __ofono_sms_txq_set_submit_notify(sms, &uuid, send_sms_submit_cb,
+ stk->extern_req, g_free);
stk->cancel_cmd = send_sms_cancel;
stk_alpha_id_set(stk, cmd->send_sms.alpha_id, &cmd->send_sms.text_attr,