summaryrefslogtreecommitdiffstats
path: root/src/ussd.c
diff options
context:
space:
mode:
authorPhilippe Nunes <philippe.nunes@linux.intel.com>2012-09-06 16:21:46 +0200
committerDenis Kenzior <denkenz@gmail.com>2012-09-11 22:33:43 -0500
commit25d51ba03bdedd34fd166d126cb2f768826e6cd5 (patch)
treecdd1056ae6462cf77f0a1a0f059846d1fe139d8b /src/ussd.c
parentcf211d17e394751292c7b988d3b80f4ec219838c (diff)
downloadofono-25d51ba03bdedd34fd166d126cb2f768826e6cd5.tar.bz2
ussd: Recover idle state after a transaction error
The "USSD terminated by network" notification is handled to recover the idle state in case of USSD transaction error.
Diffstat (limited to 'src/ussd.c')
-rw-r--r--src/ussd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ussd.c b/src/ussd.c
index 74888b2e..bc8e0f60 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -414,6 +414,16 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
return;
}
+ if (status == OFONO_USSD_STATUS_TERMINATED) {
+ ussd_change_state(ussd, USSD_STATE_IDLE);
+
+ if (ussd->pending == NULL)
+ return;
+
+ reply = __ofono_error_network_terminated(ussd->pending);
+ goto out;
+ }
+
if (status == OFONO_USSD_STATUS_NOT_SUPPORTED) {
ussd_change_state(ussd, USSD_STATE_IDLE);