From 3436c58fac7369fa34cb403b2ae86f4c334565b8 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 3 Nov 2010 22:37:17 -0500 Subject: sms: Refactor __ofono_sms_txq_submit --- src/stk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/stk.c') 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, -- cgit v1.2.3