emulator: Use __ofono_atom_find

This commit is contained in:
Denis Kenzior 2012-01-18 11:43:59 -06:00
parent 2ad5db2e99
commit 7e426f96cc
1 changed files with 2 additions and 5 deletions

View File

@ -336,15 +336,12 @@ static struct ofono_call *find_call_with_status(struct ofono_emulator *em,
int status)
{
struct ofono_modem *modem = __ofono_atom_get_modem(em->atom);
struct ofono_atom *vc_atom;
struct ofono_voicecall *vc;
vc_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_VOICECALL);
if (vc_atom == NULL)
vc = __ofono_atom_find(OFONO_ATOM_TYPE_VOICECALL, modem);
if (vc == NULL)
return NULL;
vc = __ofono_atom_get_data(vc_atom);
return __ofono_voicecall_find_call_with_status(vc, status);
}