mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
ringaccount: display clearly when no device is found
* Log when a call fails due to "0 devices found" condition. * Report an error code (no_such_device_or_address) to the call failure method. * Use dgb than warn when devices are found. Change-Id: Ie3ffa4fc1c9ebf2fea3453c647890a108213bd00
This commit is contained in:
@ -75,6 +75,7 @@
|
||||
#include <cctype>
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
namespace ring {
|
||||
|
||||
@ -486,7 +487,7 @@ RingAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
|
||||
{
|
||||
auto call = wCall.lock();
|
||||
if (not call) return;
|
||||
RING_WARN("[call %s] Found device %s", call->getCallId().c_str(), dev.toString().c_str());
|
||||
RING_DBG("[call %s] calling device %s", call->getCallId().c_str(), dev.toString().c_str());
|
||||
|
||||
auto& manager = Manager::instance();
|
||||
auto dev_call = manager.callFactory.newCall<SIPCall, RingAccount>(*sthis, manager.getNewCallID(),
|
||||
@ -572,8 +573,10 @@ RingAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
|
||||
});
|
||||
}, [=](bool ok){
|
||||
if (not ok) {
|
||||
if (auto call = wCall.lock())
|
||||
call->onFailure();
|
||||
if (auto call = wCall.lock()) {
|
||||
RING_WARN("[call:%s] no devices found", call->getCallId().c_str());
|
||||
call->onFailure(static_cast<int>(std::errc::no_such_device_or_address));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user