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

manager: cleanup

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