Skip to content
Snippets Groups Projects
Commit 0d3e36df authored by Andreas Hatziiliou's avatar Andreas Hatziiliou Committed by Adrien Béraud
Browse files

swarms_default_host: add check for removed host

Previously when the default host device was
removed, trying to host a conference would still
attempt to connect to a device with empty Uri.

Change-Id: I8f33eba5a5b93e9d1bff2275667a885a3ebe22c5
parent 7c41450f
Branches
No related tags found
No related merge requests found
...@@ -2991,7 +2991,7 @@ ConversationModule::call(const std::string& url, ...@@ -2991,7 +2991,7 @@ ConversationModule::call(const std::string& url,
auto itRdvAccount = infos.find("rdvAccount"); auto itRdvAccount = infos.find("rdvAccount");
auto itRdvDevice = infos.find("rdvDevice"); auto itRdvDevice = infos.find("rdvDevice");
auto sendCallRequest = false; auto sendCallRequest = false;
if (confId != "") { if (!confId.empty()) {
sendCallRequest = true; sendCallRequest = true;
JAMI_DEBUG("Calling self, join conference"); JAMI_DEBUG("Calling self, join conference");
} else if (!activeCalls.empty()) { } else if (!activeCalls.empty()) {
...@@ -3001,7 +3001,8 @@ ConversationModule::call(const std::string& url, ...@@ -3001,7 +3001,8 @@ ConversationModule::call(const std::string& url,
confId = ac.at("id"); confId = ac.at("id");
uri = ac.at("uri"); uri = ac.at("uri");
deviceId = ac.at("device"); deviceId = ac.at("device");
} else if (itRdvAccount != infos.end() && itRdvDevice != infos.end()) { } else if (itRdvAccount != infos.end() && itRdvDevice != infos.end()
&& !itRdvAccount->second.empty()) {
// Else, creates "to" (accountId/deviceId/conversationId/confId) and ask remote host // Else, creates "to" (accountId/deviceId/conversationId/confId) and ask remote host
sendCallRequest = true; sendCallRequest = true;
uri = itRdvAccount->second; uri = itRdvAccount->second;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment