jamiaccount: don't fail call if no DHT device but connection exists

Change-Id: I53308fca61c46551129320babc99915d927a81dd
This commit is contained in:
Adrien Béraud
2021-10-09 18:58:55 -04:00
committed by Sébastien Blin
parent 0ae5d6681f
commit ff6acce6ca

View File

@ -610,7 +610,7 @@ JamiAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
dev_call->setIceMedia(call->getIceMedia());
{
std::lock_guard<std::mutex> lk(pendingCallsMutex_);
pendingCalls_[deviceId].emplace_back(dev_call);
pendingCalls_[deviceId].emplace_back(std::move(dev_call));
}
JAMI_WARN("[call %s] No channeled socket with this peer. Send request",
@ -707,7 +707,9 @@ JamiAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
if (not ok) {
if (auto call = wCall.lock()) {
JAMI_WARN("[call:%s] no devices found", call->getCallId().c_str());
call->onFailure(static_cast<int>(std::errc::no_such_device_or_address));
// Note: if a p2p connection exists, the call will be at least in CONNECTING
if (call->getConnectionState() == Call::ConnectionState::TRYING)
call->onFailure(static_cast<int>(std::errc::no_such_device_or_address));
}
}
});