Open Source Telephony
 help / color / mirror / Atom feed
From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH] stk: Display action information while sending USSD.
Date: Tue, 28 Aug 2012 15:33:52 +0200	[thread overview]
Message-ID: <1346160832-12043-1-git-send-email-philippe.nunes@linux.intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

---
 src/stk.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 38f2e18..18a8eaf 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2026,11 +2026,6 @@ static gboolean handle_command_send_ussd(const struct stk_command *cmd,
 					cmd->send_ussd.ussd_string.len,
 					send_ussd_callback, stk);
 
-	if (err >= 0) {
-		stk->cancel_cmd = send_ussd_cancel;
-
-		return FALSE;
-	}
 
 	if (err == -ENOSYS) {
 		rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
@@ -2043,6 +2038,20 @@ static gboolean handle_command_send_ussd(const struct stk_command *cmd,
 		return TRUE;
 	}
 
+	if (err < 0) {
+		unsigned char no_cause_result[] = { 0x00 };
+
+		/*
+		 * We most likely got an out of memory error, tell SIM
+		 * to retry
+		 */
+		ADD_ERROR_RESULT(rsp->result, STK_RESULT_TYPE_TERMINAL_BUSY,
+					no_cause_result);
+		return TRUE;
+	}
+
+	stk->cancel_cmd = send_ussd_cancel;
+
 	stk_alpha_id_set(stk, cmd->send_ussd.alpha_id,
 				&cmd->send_ussd.text_attr,
 				&cmd->send_ussd.icon_id);
-- 
1.7.9.5


             reply	other threads:[~2012-08-28 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 13:33 Philippe Nunes [this message]
2012-08-30 21:37 ` [PATCH] stk: Display action information while sending USSD Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346160832-12043-1-git-send-email-philippe.nunes@linux.intel.com \
    --to=philippe.nunes@linux.intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox