mirror of git://git.sysmocom.de/ofono
ussd: Don't ignore data from TERMINATED response
Typically responses to USSD requests are coming with status zero (NOTIFY) but some are coming with status 2 (TERMINATED). If those contain data, the data should be presented to the user.
This commit is contained in:
parent
ac96c726f2
commit
0f171dac45
|
@ -417,6 +417,10 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
|
|||
}
|
||||
|
||||
if (status == OFONO_USSD_STATUS_TERMINATED) {
|
||||
if (ussd->state == USSD_STATE_ACTIVE && data && data_len > 0) {
|
||||
/* Interpret that as a Notify */
|
||||
status = OFONO_USSD_STATUS_NOTIFY;
|
||||
} else {
|
||||
ussd_change_state(ussd, USSD_STATE_IDLE);
|
||||
|
||||
if (ussd->pending == NULL)
|
||||
|
@ -425,6 +429,7 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
|
|||
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