Add error logs in addition of participants in conferences.

This commit is contained in:
Ghislain MARY 2018-02-14 11:58:46 +01:00
parent c613beed2e
commit a0b7336ec3
2 changed files with 8 additions and 2 deletions

View file

@ -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> 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<Participant>(addr);
participant->getPrivate()->createSession(*this, params, hasMedia, d->listener);
d->participants.push_back(participant);

View file

@ -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> 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<Participant>(addr);
participant->getPrivate()->createSession(*this, params, hasMedia, d->listener);
d->participants.push_back(participant);