summaryrefslogtreecommitdiffstats
path: root/drivers/isimodem/voicecall.c
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-21 10:24:30 +0200
committerAki Niemi <aki.niemi@nokia.com>2011-01-21 15:18:40 +0200
commit2a7fa4de4ec2d2f5ecd567ad9331092ed814ba3d (patch)
treec9ee76056257f65c1f841149e9aed03d6035b317 /drivers/isimodem/voicecall.c
parentbef901e189f44c66854a2513d9da828aac6671e2 (diff)
downloadofono-2a7fa4de4ec2d2f5ecd567ad9331092ed814ba3d.tar.bz2
isimodem: fix issue with user busy release
when the user rejects the incoming call, hangup_active will get called on the driver side whereas when the user rejects the waiting call, set_udub will get called on the driver side.
Diffstat (limited to 'drivers/isimodem/voicecall.c')
-rw-r--r--drivers/isimodem/voicecall.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index e5842aa4..9aa9454d 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -973,6 +973,7 @@ static void isi_hangup_current(struct ofono_voicecall *ovc,
*/
struct isi_voicecall *ivc = ofono_voicecall_get_data(ovc);
int id = 0;
+ uint8_t cause = CALL_CAUSE_RELEASE_BY_USER;
for (id = 1; id <= 7; id++) {
if (ivc->calls[id].call_id & CALL_ID_WAITING)
@@ -983,19 +984,23 @@ static void isi_hangup_current(struct ofono_voicecall *ovc,
switch (ivc->calls[id].status) {
case CALL_STATUS_CREATE:
case CALL_STATUS_COMING:
- case CALL_STATUS_PROCEEDING:
case CALL_STATUS_MO_ALERTING:
- case CALL_STATUS_MT_ALERTING:
case CALL_STATUS_ANSWERED:
goto release_by_id;
+ case CALL_STATUS_MT_ALERTING:
+ cause = CALL_CAUSE_BUSY_USER_REQUEST;
+ goto release_by_id;
+ case CALL_STATUS_PROCEEDING:
+ if (ivc->calls[id].mode_info & CALL_MODE_ORIGINATOR)
+ cause = CALL_CAUSE_BUSY_USER_REQUEST;
+ goto release_by_id;
}
}
id = CALL_ID_ACTIVE;
release_by_id:
- isi_call_release_req(ovc, id, CALL_CAUSE_TYPE_CLIENT,
- CALL_CAUSE_RELEASE_BY_USER, cb, data);
+ isi_call_release_req(ovc, id, CALL_CAUSE_TYPE_CLIENT, cause, cb, data);
}
static void isi_release_all_held(struct ofono_voicecall *ovc,