Commit 54d9c0f0 authored by Olivier Dion's avatar Olivier Dion Committed by Sébastien Blin

register thread to pjsip

Change-Id: I1acac4dd8e87d2ffe1c63638d03fd28c6749adef
parent b9779761
......@@ -1082,6 +1082,8 @@ IceTransport::isInitiator() const
bool
IceTransport::startIce(const Attribute& rem_attrs, std::vector<IceCandidate>&& rem_candidates)
{
sip_utils::register_thread();
if (not isInitialized()) {
JAMI_ERR("[ice:%p] not initialized transport", pimpl_.get());
pimpl_->is_stopped_ = true;
......@@ -1148,6 +1150,8 @@ IceTransport::startIce(const Attribute& rem_attrs, std::vector<IceCandidate>&& r
bool
IceTransport::startIce(const SDP& sdp)
{
sip_utils::register_thread();
if (pimpl_->streamsCount_ != 1) {
JAMI_ERR("Expected exactly one stream per SDP (found %u streams)", pimpl_->streamsCount_);
return false;
......
......@@ -86,6 +86,8 @@ SIPAccountBase::CreateClientDialogAndInvite(const pj_str_t* from,
pjsip_dialog** dlg,
pjsip_inv_session** inv)
{
sip_utils::register_thread();
if (pjsip_dlg_create_uac(pjsip_ua_instance(), from, contact, to, target, dlg) != PJ_SUCCESS) {
JAMI_ERR("Unable to create SIP dialogs for user agent client when calling %s", to->ptr);
return false;
......
......@@ -672,6 +672,8 @@ SIPCall::setInviteSession(pjsip_inv_session* inviteSession)
void
SIPCall::terminateSipSession(int status)
{
sip_utils::register_thread();
JAMI_DBG("[call:%s] Terminate SIP session", getCallId().c_str());
std::lock_guard<std::recursive_mutex> lk {callMutex_};
if (inviteSession_ and inviteSession_->state != PJSIP_INV_STATE_DISCONNECTED) {
......
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