From 2e52ca9e8aef9245996e795cafedb0c352885f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 11 Jan 2016 14:32:23 +0100 Subject: [PATCH] Prevents Conference.getParticipants() from including the URI of the conference focus --- coreapi/conference.cc | 4 ++-- tester/multi_call_tester.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coreapi/conference.cc b/coreapi/conference.cc index 0c7406152..7f47b19aa 100644 --- a/coreapi/conference.cc +++ b/coreapi/conference.cc @@ -66,7 +66,7 @@ public: bool microphoneIsMuted() const {return m_isMuted;} float getInputVolume() const; - virtual int getParticipantCount() const {return m_participants.size();} + virtual int getParticipantCount() const {return m_participants.size() + (isIn()?1:0);} const std::list &getParticipants() const {return m_participants;} virtual int startRecording(const char *path) = 0; @@ -585,7 +585,7 @@ int RemoteConference::addParticipant(LinphoneCall *call) { m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call)); m_state = ConnectingToFocus; linphone_address_unref(addr); - addParticipant(m_focusCall); + call->conf_ref = (LinphoneConference *)this; return 0; } else return -1; diff --git a/tester/multi_call_tester.c b/tester/multi_call_tester.c index 3807f095c..4e20d721b 100644 --- a/tester/multi_call_tester.c +++ b/tester/multi_call_tester.c @@ -263,7 +263,8 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag if(conference) { MSList *participants = linphone_conference_get_participants(conference); BC_ASSERT_EQUAL(linphone_conference_get_participant_count(conference), linphone_core_get_conference_size(marie->lc), int, "%d"); - BC_ASSERT_EQUAL(linphone_conference_get_participant_count(conference), ms_list_size(participants), int, "%d"); + BC_ASSERT_EQUAL(linphone_conference_get_participant_count(conference), ms_list_size(participants)+(linphone_conference_is_in(conference)?1:0), int, "%d"); + BC_ASSERT_TRUE(linphone_conference_is_in(conference)); ms_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy); }