From 751f2de8efdc13531f3f81bf7f77f46e6d4c63b6 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Fri, 17 Aug 2012 14:28:41 -0400 Subject: [PATCH] * #14745: gnome: make sure codecs are set to active if in the "active" list --- daemon/src/account.cpp | 3 +-- daemon/src/dbus/configurationmanager.cpp | 2 ++ gnome/src/actions.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/daemon/src/account.cpp b/daemon/src/account.cpp index f5d75e273f..2e195b5063 100644 --- a/daemon/src/account.cpp +++ b/daemon/src/account.cpp @@ -203,8 +203,7 @@ void Account::setActiveAudioCodecs(const vector<string> &list) // list contains the ordered payload of active codecs picked by the user for this account // we used the codec vector to save the order. - for (vector<string>::const_iterator iter = list.begin(); iter != list.end(); - ++iter) { + for (vector<string>::const_iterator iter = list.begin(); iter != list.end(); ++iter) { int payload = std::atoi(iter->c_str()); audioCodecList_.push_back(payload); } diff --git a/daemon/src/dbus/configurationmanager.cpp b/daemon/src/dbus/configurationmanager.cpp index 96da9af473..bebfb32cec 100644 --- a/daemon/src/dbus/configurationmanager.cpp +++ b/daemon/src/dbus/configurationmanager.cpp @@ -230,6 +230,8 @@ void ConfigurationManager::setActiveAudioCodecList(const std::vector<std::string if (acc) { acc->setActiveAudioCodecs(list); Manager::instance().saveConfig(); + } else { + ERROR("Could not find account %s", accountID.c_str()); } } diff --git a/gnome/src/actions.c b/gnome/src/actions.c index 3255a87d65..9bcc258736 100644 --- a/gnome/src/actions.c +++ b/gnome/src/actions.c @@ -890,9 +890,10 @@ sflphone_fill_audio_codec_list_per_account(account_t *account) codec_t *orig = codec_list_get_by_payload(payload, system_acodecs); codec_t *c = codec_create_new_from_caps(orig); - if (c) + if (c) { + c->is_active = TRUE; g_queue_push_tail(account->acodecs, c); - else + } else ERROR("Couldn't find codec %d %p", payload, orig); } g_array_unref(order); -- GitLab