voicecall: Use __ofono_atom_find

This commit is contained in:
Denis Kenzior 2012-01-18 11:52:17 -06:00
parent 688a788da5
commit 15ef5861c5
1 changed files with 3 additions and 6 deletions

View File

@ -3294,18 +3294,15 @@ static void emulator_atd_cb(struct ofono_emulator *em,
goto fail;
if (len == 3 && str[0] == '>' && str[1] == '1') {
struct ofono_atom *mw_atom;
struct ofono_message_waiting *mw;
const struct ofono_phone_number *ph;
const char *num;
mw_atom = __ofono_modem_find_atom(modem,
OFONO_ATOM_TYPE_MESSAGE_WAITING);
if (mw_atom == NULL)
mw = __ofono_atom_find(OFONO_ATOM_TYPE_MESSAGE_WAITING,
modem);
if (mw == NULL)
goto fail;
mw = __ofono_atom_get_data(mw_atom);
ph = __ofono_message_waiting_get_mbdn(mw, 0);
if (ph == NULL)