From: Zhenhua Zhang Date: Tue, 3 Nov 2009 17:26:08 +0000 (-0600) Subject: Fix: The use of cind_val / cind_pos was wrong X-Git-Tag: 0.10~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff2a8e6f7c70d25d9fe13c37e5761e94830a8e8e;p=platform%2Fupstream%2Fofono.git Fix: The use of cind_val / cind_pos was wrong --- diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index 2a4ea5d..15a8b49 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -350,7 +350,6 @@ static void ciev_call_notify(struct ofono_voicecall *vc, unsigned int value) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - unsigned int call_pos = vd->cind_pos[HFP_INDICATOR_CALL]; if (g_slist_length(vd->calls) == 1) { switch (value) { @@ -366,7 +365,7 @@ static void ciev_call_notify(struct ofono_voicecall *vc, } } - vd->cind_val[call_pos] = value; + vd->cind_val[HFP_INDICATOR_CALL] = value; } static void ciev_callsetup_notify(struct ofono_voicecall *vc, @@ -374,8 +373,8 @@ static void ciev_callsetup_notify(struct ofono_voicecall *vc, unsigned int value) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - unsigned int callsetup_pos = vd->cind_pos[HFP_INDICATOR_CALLSETUP]; - unsigned int call_pos = vd->cind_pos[HFP_INDICATOR_CALL]; + unsigned int ciev_callsetup = vd->cind_val[HFP_INDICATOR_CALLSETUP]; + unsigned int ciev_call = vd->cind_val[HFP_INDICATOR_CALL]; if (g_slist_length(vd->calls) == 1) { switch (value) { @@ -383,8 +382,7 @@ static void ciev_callsetup_notify(struct ofono_voicecall *vc, /* call=0 and callsetup=1: reject an incoming call * call=0 and callsetup=2,3: interrupt an outgoing call */ - if ((vd->cind_val[call_pos] == 0) && - (vd->cind_val[callsetup_pos] > 0)) + if (ciev_call == 0 && ciev_callsetup > 0) release_call(vc, call); break; case 1: @@ -398,7 +396,7 @@ static void ciev_callsetup_notify(struct ofono_voicecall *vc, } } - vd->cind_val[callsetup_pos] = value; + vd->cind_val[HFP_INDICATOR_CALLSETUP] = value; } static void ciev_notify(GAtResult *result, gpointer user_data)