All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stk: Display action information while sending USSD.
@ 2012-08-28 13:33 Philippe Nunes
  2012-08-30 21:37 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Nunes @ 2012-08-28 13:33 UTC (permalink / raw)
  To: ofono

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] stk: Display action information while sending USSD.
  2012-08-28 13:33 [PATCH] stk: Display action information while sending USSD Philippe Nunes
@ 2012-08-30 21:37 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2012-08-30 21:37 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 08/28/2012 08:33 AM, Philippe Nunes wrote:
> ---
>   src/stk.c |   19 ++++++++++++++-----
>   1 file changed, 14 insertions(+), 5 deletions(-)
>

Patch has been applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-30 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28 13:33 [PATCH] stk: Display action information while sending USSD Philippe Nunes
2012-08-30 21:37 ` 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.