summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-07-03 16:07:21 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-07-03 16:10:16 +0300
commita683b538942d740fe18fa26e1411063f42618d43 (patch)
treef17eb8ceb3a8362ac82dec575e22f224340ee40b /audio
parentd71e4fa3da0abf3a3bb4887bfca8776449d77ded (diff)
downloadbluez-a683b538942d740fe18fa26e1411063f42618d43.tar.gz
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/telephony-maemo.c3
1 files changed, 2 insertions, 1 deletions
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",