From a0b7336ec3cdb729df4367bc8f14395a5e114852 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 14 Feb 2018 11:58:46 +0100 Subject: [PATCH] Add error logs in addition of participants in conferences. --- src/conference/local-conference.cpp | 5 ++++- src/conference/remote-conference.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conference/local-conference.cpp b/src/conference/local-conference.cpp index b07f17287..fe06f6464 100644 --- a/src/conference/local-conference.cpp +++ b/src/conference/local-conference.cpp @@ -21,6 +21,7 @@ #include "content/content-type.h" #include "handlers/local-conference-event-handler.h" #include "local-conference-p.h" +#include "logger/logger.h" #include "participant-p.h" #include "xml/resource-lists.h" @@ -46,8 +47,10 @@ LocalConference::~LocalConference () { void LocalConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { L_D(); shared_ptr participant = findParticipant(addr); - if (participant) + if (participant) { + lInfo() << "Not adding participant '" << addr.asString() << "' because it is already a participant of the LocalConference"; return; + } participant = make_shared(addr); participant->getPrivate()->createSession(*this, params, hasMedia, d->listener); d->participants.push_back(participant); diff --git a/src/conference/remote-conference.cpp b/src/conference/remote-conference.cpp index dd2a8a67d..ffdcde9ab 100644 --- a/src/conference/remote-conference.cpp +++ b/src/conference/remote-conference.cpp @@ -18,6 +18,7 @@ */ #include "handlers/remote-conference-event-handler.h" +#include "logger/logger.h" #include "participant-p.h" #include "remote-conference-p.h" #include "xml/resource-lists.h" @@ -47,8 +48,10 @@ RemoteConference::~RemoteConference () { void RemoteConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { L_D(); shared_ptr participant = findParticipant(addr); - if (participant) + if (participant) { + lInfo() << "Not adding participant '" << addr.asString() << "' because it is already a participant of the RemoteConference"; return; + } participant = make_shared(addr); participant->getPrivate()->createSession(*this, params, hasMedia, d->listener); d->participants.push_back(participant);