From a683b538942d740fe18fa26e1411063f42618d43 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 3 Jul 2009 16:07:21 +0300 Subject: Ensure that a call is never added twice to the active_calls list There are some state transitions (what these are is still somewhat unclear) through which a call can enter ACTIVE state multiple times even though call->on_hold isn't TRUE. The circumstances triggering this still need investigation, but at least it's an easy one-line change to safeguard against duplicates in the active_calls list. --- audio/telephony-maemo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c index bb3891ce3..a1c2d27cf 100644 --- a/audio/telephony-maemo.c +++ b/audio/telephony-maemo.c @@ -1030,7 +1030,8 @@ static void handle_call_status(DBusMessage *msg, const char *call_path) "callheld", EV_CALLHELD_NONE); } else { - active_calls = g_slist_prepend(active_calls, call); + if (!g_slist_find(active_calls, call)) + active_calls = g_slist_prepend(active_calls, call); if (g_slist_length(active_calls) == 1) telephony_update_indicator(maemo_indicators, "call", -- cgit v1.2.1