From 506eb11b02ba992c5da843eb5bb096936009b19f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 12 Jan 2010 18:20:51 -0600 Subject: Make setting CPHS MWIS actually work --- src/message-waiting.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/message-waiting.c') diff --git a/src/message-waiting.c b/src/message-waiting.c index a0065da3..42b10358 100644 --- a/src/message-waiting.c +++ b/src/message-waiting.c @@ -699,8 +699,13 @@ static void mw_set_indicator(struct ofono_message_waiting *mw, int profile, return; try_cphs: - for (i = 0; i < 5 && i < mw->ef_cphs_mwis_length; i++) - efmwis[i] = mw->messages[i].indication ? 0xa : 0x5; + memset(efmwis, 0x55, 255); + + efmwis[0] = mw->messages[0].indication ? 0xa : 0x5; + + if (mw->ef_cphs_mwis_length > 1) + efmwis[1] = mw->messages[1].indication ? 0xa : 0x5 | + mw->messages[3].indication ? 0xa0 : 0x50; if (ofono_sim_write(mw->sim, SIM_EF_CPHS_MWIS_FILEID, mw_mwis_write_cb, OFONO_SIM_FILE_STRUCTURE_TRANSPARENT, 0, -- cgit v1.2.3