cbs: finding SIM atom seems to not necessary now
authorDenis Kenzior <denkenz@gmail.com>
Wed, 18 Jan 2012 18:52:01 +0000 (12:52 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 18 Jan 2012 18:52:01 +0000 (12:52 -0600)
src/cbs.c

index 0ba955c..d898823 100644 (file)
--- a/src/cbs.c
+++ b/src/cbs.c
@@ -174,7 +174,6 @@ 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;
@@ -193,14 +192,10 @@ void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu,
        }
 
        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;