From dd53b26de4a500c433240cecc83dce44058dbc00 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandresavard@msavard.(none)> Date: Fri, 17 Jun 2011 16:49:37 -0400 Subject: [PATCH] #6183: Add account information in request for conference call from history --- sflphone-client-gnome/src/contacts/calltree.c | 7 +++++-- sflphone-common/src/managerimpl.cpp | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index ba3ce97488..307338f039 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -306,6 +306,7 @@ calltree_create_conf_from_participant_list(GSList *list) { // concatenate for(i = 0; i < list_length; i++) { + gchar *number; gchar *participant_id = g_slist_nth_data(list, i); DEBUG("********************* participant %s ***************************", participant_id); callable_obj_t *call = calllist_get_call(history, participant_id); @@ -314,8 +315,10 @@ calltree_create_conf_from_participant_list(GSList *list) { participant_list = (void *) realloc(participant_list, (c+1) * sizeof(void *)); } - // allocate memory for teh participant number - *(participant_list+c) = g_strdup(call->_peer_number); + // allocate memory for the participant number + number = g_strconcat(call->_peer_number,",",call->_accountID, NULL); + + *(participant_list+c) = number; c++; } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index a082cae195..b2f3da14ae 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -1327,18 +1327,20 @@ void ManagerImpl::createConfFromParticipantList(const std::vector< std::string > iter++; } */ - - std::string generatedCallID = "callid"; - std::string accountstr = "Account:1307562458"; for(unsigned int i = 0; i < participantList.size(); i++) { - _debug("********************************************************************* PARTICIPANT LIST %s", participantList[i].c_str()); - std::string tostr = participantList[i].c_str(); - generatedCallID = generatedCallID + participantList[i]; + std::string numberaccount = participantList[i]; + _debug("********************************************************************* PARTICIPANT %s", numberaccount.c_str()); + std::string tostr = numberaccount.substr(0, numberaccount.find(",")); + _debug("********************************************************************* NUMBER %s", tostr.c_str()); + std::string account = numberaccount.substr(numberaccount.find(",")+1, numberaccount.size()); + _debug("********************************************************************* NUMBER %s", account.c_str()); + + std::string generatedCallID = getNewCallID(); conf->add(generatedCallID); - outgoingCall(accountstr, generatedCallID, tostr, conf->getConfID()); + outgoingCall(account, generatedCallID, tostr, conf->getConfID()); if(_dbus) { - _dbus->getCallManager()->newCallCreated(accountstr, generatedCallID, tostr); + _dbus->getCallManager()->newCallCreated(account, generatedCallID, tostr); } } -- GitLab