diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-09-26 22:36:00 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-09-26 22:36:00 -0500 |
commit | 10c6bebd80a6ba6fa752d625f6493d1f609f9f16 (patch) | |
tree | d952f3a89578e36adf48ce5671c03b4c902de5aa | |
parent | 7d101199463ab3235d87418d60ea591d38569a5a (diff) | |
download | ofono-10c6bebd80a6ba6fa752d625f6493d1f609f9f16.tar.bz2 |
huawei: Track alerting state
-rw-r--r-- | drivers/huaweimodem/voicecall.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c index 547fd522..ca4e16dc 100644 --- a/drivers/huaweimodem/voicecall.c +++ b/drivers/huaweimodem/voicecall.c @@ -321,8 +321,12 @@ static void orig_notify(GAtResult *result, gpointer user_data) static void conf_notify(GAtResult *result, gpointer user_data) { + struct ofono_voicecall *vc = user_data; + struct voicecall_data *vd = ofono_voicecall_get_data(vc); GAtResultIter iter; gint call_id; + struct ofono_call *call; + GSList *l; g_at_result_iter_init(&iter, result); @@ -333,6 +337,19 @@ static void conf_notify(GAtResult *result, gpointer user_data) return; ofono_info("Call setup: id %d", call_id); + + l = g_slist_find_custom(vd->calls, GINT_TO_POINTER(call_id), + at_util_call_compare_by_id); + if (l == NULL) { + ofono_error("Received CONF for untracked call"); + return; + } + + /* Set call to alerting */ + call = l->data; + call->status = 3; + + ofono_voicecall_notify(vc, call); } static void conn_notify(GAtResult *result, gpointer user_data) |