From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis <frederic.danis@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 4/4] voicecall: Force callheld update after calls swap
Date: Fri, 09 Mar 2012 16:26:55 +0100 [thread overview]
Message-ID: <1331306815-13424-4-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1331306815-13424-1-git-send-email-frederic.danis@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
In HFP spec, a callheld indicator update should be sent after swapping
calls, even if callheld value has not changed.
---
src/voicecall.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/voicecall.c b/src/voicecall.c
index dc4fdf5..c3fbc7b 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -746,6 +746,16 @@ static void voicecall_emit_multiparty(struct voicecall *call, gboolean mpty)
&val);
}
+static void emulator_indicator_set_forced(struct ofono_voicecall *vc,
+ const char *name)
+{
+ struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
+ struct ofono_emulator *em;
+
+ em = __ofono_atom_find(OFONO_ATOM_TYPE_EMULATOR_HFP, modem);
+ ofono_emulator_indicator_set_forced(em, name);
+}
+
static void emulator_call_status_cb(struct ofono_atom *atom, void *data)
{
struct ofono_emulator *em = __ofono_atom_get_data(atom);
@@ -1621,6 +1631,8 @@ static DBusMessage *manager_swap_without_accept(DBusConnection *conn,
vc->pending = dbus_message_ref(msg);
+ emulator_indicator_set_forced(vc, OFONO_EMULATOR_IND_CALLHELD);
+
vc->driver->swap_without_accept(vc, generic_callback, vc);
return NULL;
@@ -1646,6 +1658,8 @@ static DBusMessage *manager_swap_calls(DBusConnection *conn,
vc->pending = dbus_message_ref(msg);
+ emulator_indicator_set_forced(vc, OFONO_EMULATOR_IND_CALLHELD);
+
vc->driver->hold_all_active(vc, generic_callback, vc);
return NULL;
@@ -3080,6 +3094,9 @@ static void emulator_chld_cb(struct ofono_emulator *em,
if (vc->driver->hold_all_active == NULL)
goto fail;
+ ofono_emulator_indicator_set_forced(em,
+ OFONO_EMULATOR_IND_CALLHELD);
+
vc->pending_em = em;
vc->driver->hold_all_active(vc,
emulator_generic_cb, vc);
--
1.7.1
next prev parent reply other threads:[~2012-03-09 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 15:26 [PATCH 1/4] voicecall: Improve transitions check =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-03-09 15:26 ` [PATCH 2/4] emulator: Add API to force indicator event =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-03-14 2:45 ` Denis Kenzior
2012-03-09 15:26 ` [PATCH 3/4] emulator: Force indicator event implementation =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-03-14 2:47 ` Denis Kenzior
2012-03-09 15:26 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis [this message]
2012-03-14 2:44 ` [PATCH 1/4] voicecall: Improve transitions check Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331306815-13424-4-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox