Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH v3 1/4] ussd: Recover idle state after a transaction error
@ 2012-09-05 16:56 Philippe Nunes
  2012-09-05 16:56 ` [PATCH v3 2/4] call-forwarding: SS query is done according the class given by SS code Philippe Nunes
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Philippe Nunes @ 2012-09-05 16:56 UTC (permalink / raw)
  To: ofono

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

The "USSD terminated by network" notification is handled to recover
the idle state in case of USSD transaction error.
---
 src/ussd.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/ussd.c b/src/ussd.c
index 74888b2..a35f172 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -414,6 +414,18 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
 		return;
 	}
 
+	if (status == OFONO_USSD_STATUS_TERMINATED &&
+			(ussd->state == USSD_STATE_IDLE ||
+			ussd->state == USSD_STATE_USER_ACTION)) {
+		ussd_change_state(ussd, USSD_STATE_IDLE);
+
+		if (ussd->pending == NULL)
+			return;
+
+		reply = __ofono_error_failed(ussd->pending);
+		goto out;
+	}
+
 	if (status == OFONO_USSD_STATUS_NOT_SUPPORTED) {
 		ussd_change_state(ussd, USSD_STATE_IDLE);
 
-- 
1.7.9.5


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

end of thread, other threads:[~2012-09-05 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 16:56 [PATCH v3 1/4] ussd: Recover idle state after a transaction error Philippe Nunes
2012-09-05 16:56 ` [PATCH v3 2/4] call-forwarding: SS query is done according the class given by SS code Philippe Nunes
2012-09-05 20:05   ` Denis Kenzior
2012-09-05 16:56 ` [PATCH v3 3/4] call-barring: " Philippe Nunes
2012-09-05 16:56 ` [PATCH v3 4/4] atmodem: specify class for call barring query Philippe Nunes
2012-09-05 19:53 ` [PATCH v3 1/4] ussd: Recover idle state after a transaction error Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox