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;
}
if (cbs_topic_in_range(c.message_identifier, cbs->efcbmid_contents)) {
- struct ofono_atom *sim_atom;
-
- sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM);
- if (sim_atom == NULL)
+ if (cbs->sim == NULL)
return;
- if (!__ofono_sim_service_available(
- __ofono_atom_get_data(sim_atom),
+ if (!__ofono_sim_service_available(cbs->sim,
SIM_UST_SERVICE_DATA_DOWNLOAD_SMS_CB,
SIM_SST_SERVICE_DATA_DOWNLOAD_SMS_CB))
return;