Commit 18ed78a4 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Prevent duplicates when adding participants to a conference.

parent eab04534
......@@ -45,8 +45,14 @@ void Conference::addParticipant (const Address &addr, const CallSessionParams *p
void Conference::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
for (const auto &addr : addresses)
addParticipant(addr, params, hasMedia);
list<Address> sortedAddresses(addresses);
for (const auto &addr: sortedAddresses) {
shared_ptr<Participant> participant = findParticipant(addr);
if (!participant)
addParticipant(addr, params, hasMedia);
bool Conference::canHandleParticipants () const {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment