diff options
author | Philippe Nunes <philippe.nunes@linux.intel.com> | 2012-09-06 16:21:46 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-09-11 22:33:43 -0500 |
commit | 25d51ba03bdedd34fd166d126cb2f768826e6cd5 (patch) | |
tree | cdd1056ae6462cf77f0a1a0f059846d1fe139d8b /src/ussd.c | |
parent | cf211d17e394751292c7b988d3b80f4ec219838c (diff) | |
download | ofono-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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); |