diff --git a/sflphone-client-gnome/src/conference_obj.c b/sflphone-client-gnome/src/conference_obj.c index c193e28df0ef16e40d081c1b8840d9ae917652dd..2200ab8252b2ba374a049bb7e325cb67652b5938 100644 --- a/sflphone-client-gnome/src/conference_obj.c +++ b/sflphone-client-gnome/src/conference_obj.c @@ -152,16 +152,15 @@ void conference_participant_list_update (gchar** participants, conference_obj_t* gchar* call_id; gchar** part; + DEBUG ("Conference: Participant list update"); + if (conf->participant_list) { g_slist_free (conf->participant_list); conf->participant_list = NULL; } - DEBUG ("Conference: Participant list update"); - for (part = participants; *part; part++) { call_id = (gchar*) (*part); - DEBUG ("Adding %s", call_id); conference_add_participant (call_id, conf); } diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 9bba8babc2d71823e453e7559dc0786032fbc895..83b6cb7994075433423e93245649aaa35aee6837 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -293,20 +293,34 @@ row_activated (GtkTreeView *tree_view UNUSED, static void calltree_create_conf_from_participant_list(GSList *list) { - gchar **participant_list; + gchar **participant_list, participant_number; gint list_length = g_slist_length(list); - gint i; + gint i = 0; + gint c = 0; + DEBUG("CallTree: Create conference from participant list"); participant_list = (void *) malloc(sizeof(void*)); + + // concatenate for(i = 0; i < list_length; i++) { - gchar *participant = g_slist_nth_data(list, i); - DEBUG("********************* participant %s ***************************", participant); + gchar *participant_id = g_slist_nth_data(list, i); + DEBUG("********************* participant %s ***************************", participant_id); + callable_obj_t *call = calllist_get(history, participant_id); + + if(c!=0) { + participant_list = (void *) realloc(participant_list, (c+1) * sizeof(void *)); + } + + // allocate memory for teh participant number + *(participant_list+c) = g_strdup(call->_peer_number); + + c++; } - // dbus_create_conf_from_participant_list(participant_list); + dbus_create_conf_from_participant_list(participant_list); } /* Catch cursor-activated signal. That is, when the entry is single clicked */ diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index f2205f92de10a538bff98f5cc4eccdd061bf8819..3bbd36d94067e8f992111c3f8b1764193d911dd2 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -250,7 +250,7 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID, conference_obj_t* changed_conf = conferencelist_get (confID); GSList * part; - DEBUG ("DBUS: Conference state changed: %s\n", state); + DEBUG ("---------------------------- DBUS: Conference state changed: %s\n", state); if (changed_conf) { // remove old conference from calltree @@ -280,8 +280,9 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID, call_id = (gchar*) (part->data); call = calllist_get (current_calls, call_id); - if (call && call->_im_widget) + if (call && call->_im_widget) { im_widget_update_state (IM_WIDGET (call->_im_widget), TRUE); + } part = g_slist_next (part); } @@ -296,8 +297,9 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID, call_id = (gchar*) (part->data); call = calllist_get (current_calls, call_id); - if (call && call->_im_widget) + if (call && call->_im_widget) { im_widget_update_state (IM_WIDGET (call->_im_widget), FALSE); + } part = g_slist_next (part); } @@ -1719,10 +1721,13 @@ dbus_create_conf_from_participant_list(const gchar **list) { GError *error = NULL; + DEBUG("DBUS: Create conference from participant list"); + org_sflphone_SFLphone_CallManager_create_conf_from_participant_list(callManagerProxy, list, &error); if(error) { + DEBUG("DBUS: Error: %s", error->message); g_error_free(error); } } diff --git a/sflphone-common/src/dbus/callmanager.cpp b/sflphone-common/src/dbus/callmanager.cpp index e626602576b86cff2e617e08456f2f3ab92ee85c..2d6beaa152f843a27d76694fd9cc9fb1b8058b15 100644 --- a/sflphone-common/src/dbus/callmanager.cpp +++ b/sflphone-common/src/dbus/callmanager.cpp @@ -219,6 +219,7 @@ void CallManager::createConfFromParticipantList(const std::vector< std::string >& participants) { _debug("CallManager: Create conference from participant list"); + Manager::instance().createConfFromParticipantList(participants); } void diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index a4467fb1dbb292fc801cc9177473c25887f6621a..36adb6312fc2a52d5f47f04662f66cc791422f11 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -1326,7 +1326,7 @@ void ManagerImpl::createConfFromParticipantList(const std::vector< std::string > std::string generatedCallID = "callid"; std::string tostr = "147"; - std::string accountstr = "AccountID:123456"; + std::string accountstr = "Account:1307562458"; for(unsigned int i = 0; i < participantList.size(); i++) { _debug("PARTICIPANT LIST %s", participantList[i].c_str());