diff --git a/sflphone-client-gnome/src/conference_obj.c b/sflphone-client-gnome/src/conference_obj.c index 2200ab8252b2ba374a049bb7e325cb67652b5938..3649d996f6f5aafbb2576319e0f21cd0b622ea22 100644 --- a/sflphone-client-gnome/src/conference_obj.c +++ b/sflphone-client-gnome/src/conference_obj.c @@ -154,6 +154,11 @@ void conference_participant_list_update (gchar** participants, conference_obj_t* DEBUG ("Conference: Participant list update"); + if(conf == NULL) { + ERROR("Conference: Error: Conference is NULL"); + return; + } + if (conf->participant_list) { g_slist_free (conf->participant_list); conf->participant_list = NULL; diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 83b6cb7994075433423e93245649aaa35aee6837..80e32bd82c602b9f9fe5726b5a143855b9cc9cb9 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -320,6 +320,9 @@ calltree_create_conf_from_participant_list(GSList *list) { c++; } + participant_list = (void *) realloc(participant_list, (c+1) *sizeof(void*)); + *(participant_list+c) = NULL; + dbus_create_conf_from_participant_list(participant_list); } diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index 3bbd36d94067e8f992111c3f8b1764193d911dd2..c2b0c19cc01d978c2205767fbca2af0fc86ec5dc 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -346,6 +346,7 @@ conference_created_cb (DBusGProxy *proxy UNUSED, const gchar* confID, void * foo call->_confID = g_strdup (confID); } + set_timestamp(&new_conf->_time_start); conferencelist_add (new_conf); diff --git a/sflphone-common/src/audio/gaincontrol.cpp b/sflphone-common/src/audio/gaincontrol.cpp index 495ae12cfbf5ba20e98d9477b08cd3c51b2f0318..569191f483fbe3bdc2ee66284b6a0c5c8dda346a 100644 --- a/sflphone-common/src/audio/gaincontrol.cpp +++ b/sflphone-common/src/audio/gaincontrol.cpp @@ -30,7 +30,7 @@ GainControl::GainControl(double sr, double target) : averager(sr, SFL_GAIN_ATTAC maxIncreaseStep = exp(0.11513 * 12. * 160 / 8000); // Computed on 12 frames (240 ms) maxDecreaseStep = exp(-0.11513 * 40. * 160 / 8000); // Computed on 40 frames (800 ms) - _debug("GainControl: Target gain %d dB (%d linear)", targetLeveldB, targetLevelLinear); + _debug("GainControl: Target gain %f dB (%f linear)", targetLeveldB, targetLevelLinear); } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 36adb6312fc2a52d5f47f04662f66cc791422f11..30a4a6e76c4eb457e1c75878c402c2f470189874 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -236,7 +236,7 @@ void ManagerImpl::switchCall (const CallID& id) /* Main Thread */ bool ManagerImpl::outgoingCall (const std::string& account_id, - const CallID& call_id, const std::string& to) + const CallID& call_id, const std::string& to, const std::string& conf_id) { std::string pattern, to_cleaned; @@ -309,13 +309,17 @@ bool ManagerImpl::outgoingCall (const std::string& account_id, _warn("Manager: Warning: Could not associate call id %s to account id %s", call_id.c_str(), account_id.c_str()); } - if (getAccountLink (account_id)->newOutgoingCall (call_id, to_cleaned)) { + Call *call = NULL; + call = getAccountLink(account_id)->newOutgoingCall (call_id, to_cleaned); + if (call) { switchCall (call_id); } else { callFailure (call_id); _debug ("Manager: Error: An error occur, the call was not created"); } + call->setConfId(conf_id); + getMainBuffer()->stateInfo(); return true; @@ -1048,7 +1052,7 @@ bool ManagerImpl::isConference (const CallID& id) bool ManagerImpl::participToConference (const CallID& call_id) { - AccountID accountId = getAccountFromCall (call_id); + AccountID accountId = getAccountFromCall (call_id); Call *call = getAccountLink (accountId)->getCall (call_id); if (call == NULL) { @@ -1325,17 +1329,21 @@ void ManagerImpl::createConfFromParticipantList(const std::vector< std::string > */ std::string generatedCallID = "callid"; - std::string tostr = "147"; std::string accountstr = "Account:1307562458"; for(unsigned int i = 0; i < participantList.size(); i++) { - _debug("PARTICIPANT LIST %s", participantList[i].c_str()); + _debug("********************************************************************* PARTICIPANT LIST %s", participantList[i].c_str()); + std::string tostr = participantList[i].c_str(); generatedCallID = generatedCallID + participantList[i]; - outgoingCall(accountstr, generatedCallID, tostr); conf->add(generatedCallID); + outgoingCall(accountstr, generatedCallID, tostr, conf->getConfID()); } _conferencemap.insert(std::pair<CallID, Conference *> (conf->getConfID(), conf)); + + if (_dbus) { + _dbus->getCallManager()->conferenceCreated (conf->getConfID()); + } } @@ -1555,8 +1563,6 @@ void ManagerImpl::joinConference (const CallID& conf_id1, iter_participant++; } - // detachParticipant(default_id, ""); - } void ManagerImpl::addStream (const CallID& call_id) diff --git a/sflphone-common/src/managerimpl.h b/sflphone-common/src/managerimpl.h index c8890d0e008efb206ddb10d374f8b20887597e19..da0e1cda0b3d9e8135fef9fa20458bfdfb12d477 100644 --- a/sflphone-common/src/managerimpl.h +++ b/sflphone-common/src/managerimpl.h @@ -194,12 +194,13 @@ class ManagerImpl * Functions which occur with a user's action * Place a new call * @param accountId The account to make tha call with - * @param id The call identifier + * @param call_id The call identifier * @param to The recipient of the call + * @param conf_id The conference identifier if any * @return bool true on success * false otherwise */ - bool outgoingCall (const AccountID& accountId, const CallID& id, const std::string& to); + bool outgoingCall (const AccountID&, const CallID&, const std::string&, const std::string& = ""); /** * Functions which occur with a user's action