message-waiting: Use new API for CPHS MBDN

This commit is contained in:
Denis Kenzior 2011-12-16 16:10:21 -06:00
parent 748259a275
commit 40db3b9528
1 changed files with 2 additions and 4 deletions

View File

@ -618,7 +618,6 @@ static void mw_mbi_read_cb(int ok, int total_length, int record,
{
struct ofono_message_waiting *mw = userdata;
int i, err;
const unsigned char *st;
if (!ok || record_length < 4) {
ofono_error("Unable to read mailbox identifies "
@ -652,9 +651,8 @@ out:
* Mailbox numbers located in Byte 1, bits 6 & 5,
* Check for Activated & Allocated
*/
st = ofono_sim_get_cphs_service_table(mw->sim);
if (st && bit_field(st[0], 4, 2) == 3) {
if (__ofono_sim_cphs_service_available(mw->sim,
SIM_CPHS_SERVICE_MAILBOX_NUMBERS)) {
ofono_sim_read(mw->sim_context, SIM_EF_CPHS_MBDN_FILEID,
OFONO_SIM_FILE_STRUCTURE_FIXED,
mw_cphs_mbdn_read_cb, mw);