Skip to content
Snippets Groups Projects
Commit 33b98870 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

turn: avoid to crash if pj_turn_sock_alloc fails

Change-Id: Ie257ba783b6dbb1a7b2fd95771d73275a5c264bf
parent c25567fe
No related branches found
No related tags found
No related merge requests found
...@@ -276,9 +276,13 @@ TurnTransport::TurnTransport(const TurnTransportParams& params) ...@@ -276,9 +276,13 @@ TurnTransport::TurnTransport(const TurnTransportParams& params)
// TURN connection/allocation // TURN connection/allocation
JAMI_DBG() << "Connecting to TURN " << server.toString(true, true); JAMI_DBG() << "Connecting to TURN " << server.toString(true, true);
try {
PjsipCall(pj_turn_sock_alloc, PjsipCall(pj_turn_sock_alloc,
pimpl_->relay, &pimpl_->relayAddr, server.getPort(), pimpl_->relay, &pimpl_->relayAddr, server.getPort(),
nullptr, &cred, &turn_alloc_param); nullptr, &cred, &turn_alloc_param);
} catch (const sip_utils::PjsipFailure& e) {
JAMI_ERR("pj_turn_sock_alloc failed: %s", e.what());
}
} }
TurnTransport::~TurnTransport() = default; TurnTransport::~TurnTransport() = default;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment