mirror of git://git.sysmocom.de/ofono
ussd: Switch the state from USER_ACTION to IDLE
... when a USSD notification is received. Some networks send 0 (no further user action required) after the response timeout expires. That should result in the user input form getting removed from the ME screen.
This commit is contained in:
parent
49a7d0aa1b
commit
980bb705d1
14
src/ussd.c
14
src/ussd.c
|
@ -511,6 +511,20 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
|
|||
DBUS_TYPE_STRING, &str, DBUS_TYPE_INVALID);
|
||||
|
||||
ussd_change_state(ussd, new_state);
|
||||
goto free;
|
||||
} else if (ussd->state == USSD_STATE_USER_ACTION &&
|
||||
status != OFONO_USSD_STATUS_ACTION_REQUIRED) {
|
||||
ussd_change_state(ussd, USSD_STATE_IDLE);
|
||||
|
||||
if (status == OFONO_USSD_STATUS_NOTIFY && str && str[0]) {
|
||||
const char *path = __ofono_atom_get_path(ussd->atom);
|
||||
|
||||
g_dbus_emit_signal(conn, path,
|
||||
OFONO_SUPPLEMENTARY_SERVICES_INTERFACE,
|
||||
"NotificationReceived", DBUS_TYPE_STRING,
|
||||
&str, DBUS_TYPE_INVALID);
|
||||
}
|
||||
|
||||
goto free;
|
||||
} else {
|
||||
ofono_error("Received an unsolicited USSD but can't handle.");
|
||||
|
|
Loading…
Reference in New Issue