diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-11-10 04:27:52 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-10 09:10:48 -0600 |
commit | 32e4eae81428d0fbca77893065629e5e8c1d7249 (patch) | |
tree | 58ed287e1701999fa71941b58e6d2c4541e04e4f /src/cbs.c | |
parent | 45b944d84b55e76eeb410cd9a09e3ce2578a8382 (diff) | |
download | ofono-32e4eae81428d0fbca77893065629e5e8c1d7249.tar.gz |
cbs: CBS-PP download must be enabled in sst / est
Diffstat (limited to 'src/cbs.c')
-rw-r--r-- | src/cbs.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -173,6 +173,7 @@ static void cbs_dispatch_text(struct ofono_cbs *cbs, enum sms_class cls, void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu, int pdu_len) { + struct ofono_modem *modem = __ofono_atom_get_modem(cbs->atom); struct cbs c; enum sms_class cls; gboolean udhi; @@ -181,6 +182,7 @@ void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu, enum sms_charset charset; char *message; char iso639_lang[3]; + struct ofono_atom *sim_atom; if (cbs->assembly == NULL) return; @@ -191,6 +193,17 @@ void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu, } if (cbs_topic_in_range(c.message_identifier, cbs->efcbmid_contents)) { + sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM); + + if (!sim_atom) + return; + + if (!__ofono_sim_service_available( + __ofono_atom_get_data(sim_atom), + SIM_UST_SERVICE_DATA_DOWNLOAD_SMS_CB, + SIM_SST_SERVICE_DATA_DOWNLOAD_SMS_CB)) + return; + if (cbs->stk) __ofono_cbs_sim_download(cbs->stk, &c); return; |