mirror of git://git.sysmocom.de/ofono
message-waiting: Use __ofono_atom_find macro
This commit is contained in:
parent
74d545d8f4
commit
3757fe01f2
|
@ -1022,7 +1022,6 @@ void ofono_message_waiting_register(struct ofono_message_waiting *mw)
|
||||||
DBusConnection *conn;
|
DBusConnection *conn;
|
||||||
const char *path;
|
const char *path;
|
||||||
struct ofono_modem *modem;
|
struct ofono_modem *modem;
|
||||||
struct ofono_atom *sim_atom;
|
|
||||||
|
|
||||||
if (mw == NULL)
|
if (mw == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -1043,11 +1042,9 @@ void ofono_message_waiting_register(struct ofono_message_waiting *mw)
|
||||||
|
|
||||||
ofono_modem_add_interface(modem, OFONO_MESSAGE_WAITING_INTERFACE);
|
ofono_modem_add_interface(modem, OFONO_MESSAGE_WAITING_INTERFACE);
|
||||||
|
|
||||||
sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM);
|
mw->sim = __ofono_atom_find(OFONO_ATOM_TYPE_SIM, modem);
|
||||||
|
if (mw->sim) {
|
||||||
if (sim_atom) {
|
|
||||||
/* Assume that if sim atom exists, it is ready */
|
/* Assume that if sim atom exists, it is ready */
|
||||||
mw->sim = __ofono_atom_get_data(sim_atom);
|
|
||||||
mw->sim_context = ofono_sim_context_create(mw->sim);
|
mw->sim_context = ofono_sim_context_create(mw->sim);
|
||||||
|
|
||||||
/* Loads MWI states and MBDN from SIM */
|
/* Loads MWI states and MBDN from SIM */
|
||||||
|
|
Loading…
Reference in New Issue