Commit 6a34602c authored by Adrien Béraud's avatar Adrien Béraud

manager: cleanup

Change-Id: I8dfdbf2d406fab9f5c7a5533b0406d87bd678122
parent 93f872e5
......@@ -125,7 +125,8 @@ std::string Conference::getStateStr() const
}
}
ParticipantSet Conference::getParticipantList() const
const ParticipantSet&
Conference::getParticipantList() const
{
return participants_;
}
......
......@@ -93,7 +93,7 @@ class Conference : public Recordable {
/**
* Get the participant list for this conference
*/
ParticipantSet getParticipantList() const;
const ParticipantSet& getParticipantList() const;
/**
* Get the display names or peer numbers for this conference
......
......@@ -384,10 +384,10 @@ JamiAccount::newOutgoingCall(const std::string& toUrl,
startOutgoingCall(call, toUri);
} catch (...) {
#if HAVE_RINGNS
NameDirectory::lookupUri(suffix, nameServer_, [wthis_=weak(),call](const std::string& result,
NameDirectory::lookupUri(suffix, nameServer_, [wthis_=weak(), call](const std::string& result,
NameDirectory::Response response) {
// we may run inside an unknown thread, but following code must be called in main thread
runOnMainThread([=, &result]() {
runOnMainThread([wthis_, result, response, call]() {
if (response != NameDirectory::Response::found) {
call->onFailure(EINVAL);
return;
......
......@@ -2940,16 +2940,14 @@ Manager::getDisplayNames(const std::string& confID) const
std::vector<std::string>
Manager::getParticipantList(const std::string& confID) const
{
std::vector<std::string> v;
ConferenceMap::const_iterator iter_conf = pimpl_->conferenceMap_.find(confID);
auto iter_conf = pimpl_->conferenceMap_.find(confID);
if (iter_conf != pimpl_->conferenceMap_.end()) {
const ParticipantSet participants(iter_conf->second->getParticipantList());
std::copy(participants.begin(), participants.end(), std::back_inserter(v));;
const ParticipantSet& participants(iter_conf->second->getParticipantList());
return {participants.begin(), participants.end()};
} else
JAMI_WARN("Did not find conference %s", confID.c_str());
return v;
return {};
}
std::string
......
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