Commit d4aeb0b9 authored by Adrien Béraud's avatar Adrien Béraud

jamiaccount: fail call if not loaded

Change-Id: I9c5d211598890f443761c4902c1290d8ace5a55a
parent cbbf2f71
......@@ -505,6 +505,12 @@ AccountManager::forEachDevice(const dht::InfoHash& to,
std::function<void(const dht::InfoHash&)>&& op,
std::function<void(bool)>&& end)
{
if (not dht_) {
JAMI_ERR("forEachDevice: no dht");
if (end)
end(false);
return;
}
auto treatedDevices = std::make_shared<std::set<dht::InfoHash>>();
dht_->get<dht::crypto::RevocationList>(to, [to](dht::crypto::RevocationList&& crl){
tls::CertificateStore::instance().pinRevocationList(to.toString(), std::move(crl));
......
......@@ -464,7 +464,7 @@ initICE(const std::vector<uint8_t> &msg, const std::shared_ptr<IceTransport> &ic
void
JamiAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::string& toUri)
{
if (not accountManager_) {
if (not accountManager_ or not dht_) {
call->onFailure(ENETDOWN);
return;
}
......
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