Skip to content
Snippets Groups Projects
Commit be5af7a9 authored by ovari's avatar ovari
Browse files

cleanup

…
→

Change-Id: I3421a0b8b9528a6815da6b826a1ca1b066b9b73f
parent ef441f56
Branches
No related tags found
No related merge requests found
...@@ -245,8 +245,8 @@ SystemCodecContainer::checkInstalledCodecs() ...@@ -245,8 +245,8 @@ SystemCodecContainer::checkInstalledCodecs()
codecIt->codecType = (CodecType)((unsigned) codecType & ~CODEC_DECODER); codecIt->codecType = (CodecType)((unsigned) codecType & ~CODEC_DECODER);
} }
} }
JAMI_INFO("Encoders found: %s", enc_ss.str().c_str()); JAMI_INFO("Encoder(s) found: %s", enc_ss.str().c_str());
JAMI_INFO("Decoders found: %s", dec_ss.str().c_str()); JAMI_INFO("Decoder(s) found: %s", dec_ss.str().c_str());
} }
std::vector<std::shared_ptr<SystemCodecInfo>> std::vector<std::shared_ptr<SystemCodecInfo>>
...@@ -256,7 +256,7 @@ SystemCodecContainer::getSystemCodecInfoList(MediaType mediaType) ...@@ -256,7 +256,7 @@ SystemCodecContainer::getSystemCodecInfoList(MediaType mediaType)
return availableCodecList_; return availableCodecList_;
// otherwise we have to instantiate a new list containing filtered objects // otherwise we have to instantiate a new list containing filtered objects
// must be destroyed by the caller... // must be destroyed by the caller
std::vector<std::shared_ptr<SystemCodecInfo>> systemCodecList; std::vector<std::shared_ptr<SystemCodecInfo>> systemCodecList;
for (const auto& codecIt : availableCodecList_) { for (const auto& codecIt : availableCodecList_) {
if (codecIt->mediaType & mediaType) if (codecIt->mediaType & mediaType)
......
...@@ -68,7 +68,7 @@ SipTransport::SipTransport(pjsip_transport* t) ...@@ -68,7 +68,7 @@ SipTransport::SipTransport(pjsip_transport* t)
: transport_(nullptr, deleteTransport) : transport_(nullptr, deleteTransport)
{ {
if (not t or pjsip_transport_add_ref(t) != PJ_SUCCESS) if (not t or pjsip_transport_add_ref(t) != PJ_SUCCESS)
throw std::runtime_error("invalid transport"); throw std::runtime_error("Invalid transport");
// Set pointer here, right after the successful pjsip_transport_add_ref // Set pointer here, right after the successful pjsip_transport_add_ref
transport_.reset(t); transport_.reset(t);
...@@ -180,7 +180,7 @@ SipTransport::getTlsMtu() ...@@ -180,7 +180,7 @@ SipTransport::getTlsMtu()
* This method is broken by definition. * This method is broken by definition.
* A MTU should not be defined at this layer. * A MTU should not be defined at this layer.
* And a correct value should come from the underlying transport itself, * And a correct value should come from the underlying transport itself,
* not from a constant... * not from a constant
*/ */
} }
...@@ -195,7 +195,7 @@ SipTransportBroker::~SipTransportBroker() ...@@ -195,7 +195,7 @@ SipTransportBroker::~SipTransportBroker()
udpTransports_.clear(); udpTransports_.clear();
transports_.clear(); transports_.clear();
JAMI_DBG("destroying SipTransportBroker@%p", this); JAMI_DBG("Destroying SipTransportBroker@%p", this);
} }
void void
...@@ -203,9 +203,9 @@ SipTransportBroker::transportStateChanged(pjsip_transport* tp, ...@@ -203,9 +203,9 @@ SipTransportBroker::transportStateChanged(pjsip_transport* tp,
pjsip_transport_state state, pjsip_transport_state state,
const pjsip_transport_state_info* info) const pjsip_transport_state_info* info)
{ {
JAMI_DBG("pjsip transport@%p %s -> %s", tp, tp->info, SipTransport::stateToStr(state)); JAMI_DBG("pjsip transport@%p %s %s", tp, tp->info, SipTransport::stateToStr(state));
// First make sure that this transport is handled by us // First ensure that this transport is handled by us
// and remove it from any mapping if destroy pending or done. // and remove it from any mapping if destroy pending or done.
std::shared_ptr<SipTransport> sipTransport; std::shared_ptr<SipTransport> sipTransport;
...@@ -334,7 +334,7 @@ SipTransportBroker::getTlsListener(const dhtnet::IpAddr& ipAddress, const pjsip_ ...@@ -334,7 +334,7 @@ SipTransportBroker::getTlsListener(const dhtnet::IpAddr& ipAddress, const pjsip_
{ {
RETURN_IF_FAIL(settings, nullptr, "TLS settings not specified"); RETURN_IF_FAIL(settings, nullptr, "TLS settings not specified");
RETURN_IF_FAIL(ipAddress, nullptr, "Unable to determine IP address for this transport"); RETURN_IF_FAIL(ipAddress, nullptr, "Unable to determine IP address for this transport");
JAMI_DEBUG("Creating TLS listener on {:s}...", ipAddress.toString(true)); JAMI_DEBUG("Creating TLS listener on {:s}", ipAddress.toString(true));
#if 0 #if 0
JAMI_DBG(" ca_list_file : %s", settings->ca_list_file.ptr); JAMI_DBG(" ca_list_file : %s", settings->ca_list_file.ptr);
JAMI_DBG(" cert_file : %s", settings->cert_file.ptr); JAMI_DBG(" cert_file : %s", settings->cert_file.ptr);
......
...@@ -327,7 +327,7 @@ transaction_request_cb(pjsip_rx_data* rdata) ...@@ -327,7 +327,7 @@ transaction_request_cb(pjsip_rx_data* rdata)
pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_MESSAGE_ID, nullptr); pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_MESSAGE_ID, nullptr);
std::string id = {}; std::string id = {};
if (!msgId) { if (!msgId) {
// Supports imdn message format https://tools.ietf.org/html/rfc5438#section-7.1.1.3 // Supports IMDN message format https://tools.ietf.org/html/rfc5438#section-7.1.1.3
constexpr pj_str_t STR_IMDN_MESSAGE_ID = jami::sip_utils::CONST_PJ_STR( constexpr pj_str_t STR_IMDN_MESSAGE_ID = jami::sip_utils::CONST_PJ_STR(
"imdn.Message-ID"); "imdn.Message-ID");
msgId = (pjsip_generic_string_hdr*) msgId = (pjsip_generic_string_hdr*)
...@@ -457,7 +457,7 @@ transaction_request_cb(pjsip_rx_data* rdata) ...@@ -457,7 +457,7 @@ transaction_request_cb(pjsip_rx_data* rdata)
pjsip_dialog* dialog = nullptr; pjsip_dialog* dialog = nullptr;
if (pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, nullptr, &dialog) if (pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, nullptr, &dialog)
!= PJ_SUCCESS) { != PJ_SUCCESS) {
JAMI_ERR("Unable to create uas"); JAMI_ERR("Unable to create UAS");
call.reset(); call.reset();
try_respond_stateless(endpt_, try_respond_stateless(endpt_,
rdata, rdata,
...@@ -741,7 +741,7 @@ SIPVoIPLink::~SIPVoIPLink() {} ...@@ -741,7 +741,7 @@ SIPVoIPLink::~SIPVoIPLink() {}
void void
SIPVoIPLink::shutdown() SIPVoIPLink::shutdown()
{ {
JAMI_DBG("Shutdown SIPVoIPLink@%p...", this); JAMI_DBG("Shutting down SIPVoIPLink@%p", this);
// Remaining calls should not happen as possible upper callbacks // Remaining calls should not happen as possible upper callbacks
// may be called and another instance of SIPVoIPLink can be re-created! // may be called and another instance of SIPVoIPLink can be re-created!
...@@ -759,7 +759,7 @@ SIPVoIPLink::shutdown() ...@@ -759,7 +759,7 @@ SIPVoIPLink::shutdown()
pj_caching_pool_destroy(&cp_); pj_caching_pool_destroy(&cp_);
sipTransportBroker.reset(); sipTransportBroker.reset();
JAMI_DBG("SIPVoIPLink@%p is shutdown", this); JAMI_DBG("SIPVoIPLink@%p shutdown successfully completed", this);
} }
std::shared_ptr<SIPAccountBase> std::shared_ptr<SIPAccountBase>
...@@ -774,7 +774,7 @@ SIPVoIPLink::guessAccount(std::string_view userName, ...@@ -774,7 +774,7 @@ SIPVoIPLink::guessAccount(std::string_view userName,
server.data(), server.data(),
(int) fromUri.size(), (int) fromUri.size(),
fromUri.data()); fromUri.data());
// Try to find the account id from username and server name by full match // Attempt to find the account id from username and server name by full match
std::shared_ptr<SIPAccountBase> result; std::shared_ptr<SIPAccountBase> result;
std::shared_ptr<SIPAccountBase> IP2IPAccount; std::shared_ptr<SIPAccountBase> IP2IPAccount;
...@@ -857,7 +857,7 @@ static void ...@@ -857,7 +857,7 @@ static void
invite_session_state_changed_cb(pjsip_inv_session* inv, pjsip_event* ev) invite_session_state_changed_cb(pjsip_inv_session* inv, pjsip_event* ev)
{ {
if (inv == nullptr or ev == nullptr) { if (inv == nullptr or ev == nullptr) {
throw VoipLinkException("unexpected null pointer"); throw VoipLinkException("Unexpected null pointer");
} }
auto call = getCallFromInvite(inv); auto call = getCallFromInvite(inv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment