diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-11-07 18:42:19 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-08 13:36:47 -0600 |
commit | 028c8c011b2e499f3f417b3fed9ccf71c3280128 (patch) | |
tree | 6cba75b4d5c4df2342ed62690cb2c22030c190c9 /src | |
parent | 65159c2f0ba8fb516b0e0d9ef66aaaaba066434a (diff) | |
download | ofono-028c8c011b2e499f3f417b3fed9ccf71c3280128.tar.bz2 |
sms: Handle "USIM Download" SMS type.
Diffstat (limited to 'src')
-rw-r--r-- | src/sms.c | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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, int len, int tpdu_len) { + struct ofono_modem *modem = __ofono_atom_get_modem(sms->atom); + struct ofono_atom *stk_atom; struct sms s; enum sms_class cls; @@ -1479,13 +1481,22 @@ void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu, break; case SMS_PID_TYPE_USIM_DOWNLOAD: case SMS_PID_TYPE_ANSI136: - if (cls == SMS_CLASS_2) { - ofono_error("(U)SIM Download messages not supported"); + /* If not Class 2, handle in a "normal" way */ + if (cls != SMS_CLASS_2) + break; + + stk_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_STK); + + if (!stk_atom) return; - } - /* Otherwise handle in a "normal" way */ - break; + __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: break; } |