From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 10/10] telephony-ofono: fix not updating indicators when a call is removed
Date: Wed, 5 Jan 2011 17:59:47 +0200 [thread overview]
Message-ID: <1294243187-1849-11-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1294243187-1849-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
In some extreme cases such as modem removal ofono may not have a chance
to set the call to disconnected state so indicators would not be update
properly.
---
audio/telephony-ofono.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 6492081..ae8f56a 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -457,6 +457,16 @@ static void call_free(struct voice_call *vc)
{
DBG("%s", vc->obj_path);
+ if (vc->status == CALL_STATUS_ACTIVE)
+ telephony_update_indicator(ofono_indicators, "call",
+ EV_CALL_INACTIVE);
+ else
+ telephony_update_indicator(ofono_indicators, "callsetup",
+ EV_CALLSETUP_INACTIVE);
+
+ if (vc->status == CALL_STATUS_INCOMING)
+ telephony_calling_stopped_ind();
+
g_dbus_remove_watch(connection, vc->watch);
g_free(vc->obj_path);
g_free(vc->number);
@@ -489,14 +499,6 @@ static gboolean handle_vc_property_changed(DBusConnection *conn,
dbus_message_iter_get_basic(&sub, &state);
DBG("State %s", state);
if (g_str_equal(state, "disconnected")) {
- if (vc->status == CALL_STATUS_ACTIVE)
- telephony_update_indicator(ofono_indicators,
- "call", EV_CALL_INACTIVE);
- else
- telephony_update_indicator(ofono_indicators,
- "callsetup", EV_CALLSETUP_INACTIVE);
- if (vc->status == CALL_STATUS_INCOMING)
- telephony_calling_stopped_ind();
calls = g_slist_remove(calls, vc);
call_free(vc);
} else if (g_str_equal(state, "active")) {
--
1.7.1
next prev parent reply other threads:[~2011-01-05 15:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 15:59 [PATCH 00/10] Update telephony-ofono driver Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 01/10] telephony-ofono: notify alerting calls when headset connects Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 02/10] telephony-ofono: fix not being able to answer alerting/waiting calls Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 03/10] telephony-ofono: fix not setting originating when status property changes Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 04/10] telephony-ofono: make use of GetModems method Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 05/10] telephony-ofono: make use of GetCalls method Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 06/10] telephony-ofono: fix not canceling pending calls on exit Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 07/10] telephony-ofono: simplify watches handling logic Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 08/10] telephony-ofono: handle ofono appearing/disappearing from bus Luiz Augusto von Dentz
2011-01-05 15:59 ` [PATCH 09/10] telephony-ofono: add handling for Modem.Interfaces property Luiz Augusto von Dentz
2011-01-05 15:59 ` Luiz Augusto von Dentz [this message]
2011-01-06 22:39 ` [PATCH 00/10] Update telephony-ofono driver Johan Hedberg
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=1294243187-1849-11-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.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