diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 45311edcf8c3d919bf5f83b335bdf8d46774e8d7..95147667d32c3d948c1e99739415c89ed9c84df8 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -901,7 +901,7 @@ sflphone_add_conference() sflphone_join_conference(const gchar* sel_confID, const gchar* drag_confID) { DEBUG("sflphone join two conference"); - dbus_join_conference(sel_confID, sel_confID); + dbus_join_conference(sel_confID, drag_confID); } void diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 4d56c41a684ee943a652a4bebcadd5e482822b88..9c94b8e09d37443026650142b88e0592f071ac56 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -1136,6 +1136,7 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context, gint x, g else { dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID; + dragged_conf = (conference_obj_t*)g_value_get_pointer(&val); } g_print(" INTO_OR_AFTER dragged_path %s, dragged_call_id %s, dragged_path_depth %i\n", dragged_path, dragged_call_id, dragged_path_depth); break; @@ -1159,6 +1160,7 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context, gint x, g else { dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID; + dragged_conf = (conference_obj_t*)g_value_get_pointer(&val); } g_print(" INTO_OR_BEFORE dragged_path %s, dragged_call_id %s, dragged_path_depth %i\n", dragged_path, dragged_call_id, dragged_path_depth); break; diff --git a/sflphone-common/src/dbus/callmanager.cpp b/sflphone-common/src/dbus/callmanager.cpp index ffb0facf700688074d1b945c4be31c211d9bdd97..f3324dfc7945d0a1060cf9e3ba0ca7dca1f2c853 100644 --- a/sflphone-common/src/dbus/callmanager.cpp +++ b/sflphone-common/src/dbus/callmanager.cpp @@ -157,7 +157,7 @@ CallManager::detachParticipant (const std::string& callID) void CallManager::joinConference (const std::string& sel_confID, const std::string& drag_confID) { - _debug ("CallManager::joinParticipant received %s, %s\n", sel_confID.c_str(), drag_confID.c_str()); + _debug ("CallManager::joinConference received %s, %s\n", sel_confID.c_str(), drag_confID.c_str()); Manager::instance().joinConference(sel_confID, drag_confID); } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 7dc8a1830db8ef7249e49b69dfd2b103ed2e62c3..4874cb0bab10faf09a967ff702026f9b2878c669 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -979,6 +979,7 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id) // store the current call id (it will change in offHoldCall or in answerCall) CallID current_call_id = getCurrentCallId(); + _debug(" addParticipant: enter main process\n"); if(iter != _conferencemap.end()) { Conference* conf = iter->second; @@ -1022,6 +1023,9 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id) _dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr()); } + { + _debug(" addParticipant: Error, conference %s conference_id not found!\n", conference_id.c_str()); + } // bind main participant to conference after adding new participant @@ -1362,10 +1366,12 @@ ManagerImpl::processRemainingParticipant(CallID current_call_id, Conference *con void ManagerImpl::joinConference(const CallID& conf_id1, const CallID& conf_id2) { + _debug("ManagerImpl::joinConference(%s, %s)\n", conf_id1.c_str(), conf_id2.c_str()); + ConferenceMap::iterator iter; - Conference *conf1; - Conference *conf2; + Conference *conf1 = NULL; + Conference *conf2 = NULL; iter = _conferencemap.find(conf_id1); @@ -1377,6 +1383,19 @@ ManagerImpl::joinConference(const CallID& conf_id1, const CallID& conf_id2) if(iter != _conferencemap.end()) conf2 = iter->second; + ParticipantSet participants = conf1->getParticipantList(); + + ParticipantSet::iterator iter_participant = participants.begin(); + + while(iter_participant != participants.end()) + { + detachParticipant(*iter_participant, ""); + addParticipant(*iter_participant, conf_id2); + + iter_participant++; + } + + // detachParticipant(default_id, ""); }