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.
This commit is contained in:
Philippe Nunes 2012-09-06 16:21:46 +02:00 committed by Denis Kenzior
parent cf211d17e3
commit 25d51ba03b
1 changed files with 10 additions and 0 deletions

View File

@ -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);