Skip to contentSkip to conversation

stk: Display action information while sending USSD.

PATCH In review Philippe Nunes 2 participants 2 messages Aug 28, 2012 – Aug 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stk: Display action information while sending USSD.

---
 src/stk.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
src/stk.c +14 -5
index 38f2e18..18a8eaf 100644
@@ -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);
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Philippe,

Quoted 4 lines · Philippe Nunes
---
  src/stk.c |   19 ++++++++++++++-----
  1 file changed, 14 insertions(+), 5 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis