mirror of git://git.sysmocom.de/ofono
sms: Handle "USIM Download" SMS type.
This commit is contained in:
parent
65159c2f0b
commit
028c8c011b
23
src/sms.c
23
src/sms.c
|
@ -1415,6 +1415,8 @@ static inline gboolean handle_mwi(struct ofono_sms *sms, struct sms *s)
|
||||||
void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu,
|
void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu,
|
||||||
int len, int tpdu_len)
|
int len, int tpdu_len)
|
||||||
{
|
{
|
||||||
|
struct ofono_modem *modem = __ofono_atom_get_modem(sms->atom);
|
||||||
|
struct ofono_atom *stk_atom;
|
||||||
struct sms s;
|
struct sms s;
|
||||||
enum sms_class cls;
|
enum sms_class cls;
|
||||||
|
|
||||||
|
@ -1479,13 +1481,22 @@ void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu,
|
||||||
break;
|
break;
|
||||||
case SMS_PID_TYPE_USIM_DOWNLOAD:
|
case SMS_PID_TYPE_USIM_DOWNLOAD:
|
||||||
case SMS_PID_TYPE_ANSI136:
|
case SMS_PID_TYPE_ANSI136:
|
||||||
if (cls == SMS_CLASS_2) {
|
/* If not Class 2, handle in a "normal" way */
|
||||||
ofono_error("(U)SIM Download messages not supported");
|
if (cls != SMS_CLASS_2)
|
||||||
return;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
/* Otherwise handle in a "normal" way */
|
stk_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_STK);
|
||||||
break;
|
|
||||||
|
if (!stk_atom)
|
||||||
|
return;
|
||||||
|
|
||||||
|
__ofono_sms_sim_download(__ofono_atom_get_data(stk_atom),
|
||||||
|
&s, NULL, sms);
|
||||||
|
|
||||||
|
/* Passing the USIM response back to network is not
|
||||||
|
* currently support */
|
||||||
|
/* TODO: store in EFsms if not handled */
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue