mirror of git://git.sysmocom.de/ofono
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:
parent
cf211d17e3
commit
25d51ba03b
10
src/ussd.c
10
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue