Skip to content
Snippets Groups Projects
Commit c16f8cde authored by Adrien Béraud's avatar Adrien Béraud
Browse files

sipvoiplink: cleanup

Change-Id: I8a2bbaaff0569a17c67501709cb12f0ac39b5976
parent 8ee06563
No related branches found
No related tags found
No related merge requests found
......@@ -1193,7 +1193,9 @@ transaction_state_changed_cb(pjsip_inv_session* inv, pjsip_transaction* tsx, pjs
if (not call)
return;
#ifdef DEBUG_SIP_REQUEST_MSG
processInviteResponseHelper(inv, event);
#endif
// We process here only incoming request message
if (tsx->role != PJSIP_ROLE_UAS or tsx->state != PJSIP_TSX_STATE_TRYING
......@@ -1214,9 +1216,8 @@ transaction_state_changed_cb(pjsip_inv_session* inv, pjsip_transaction* tsx, pjs
}
// Using method name to dispatch
const std::string methodName {msg->line.req.method.name.ptr,
(unsigned) msg->line.req.method.name.slen};
JAMI_DBG("[INVITE:%p] RX SIP method %d (%s)", inv, msg->line.req.method.id, methodName.c_str());
auto methodName = sip_utils::as_view(msg->line.req.method.name);
JAMI_DBG("[INVITE:%p] RX SIP method %d (%.*s)", inv, msg->line.req.method.id, (int)methodName.size(), methodName.data());
#ifdef DEBUG_SIP_REQUEST_MSG
char msgbuf[1000];
......@@ -1262,9 +1263,9 @@ processInviteResponseHelper(pjsip_inv_session* inv, pjsip_event* event)
return;
}
JAMI_INFO("[INVITE:%p] SIP RX response: reason %s, status code %i",
JAMI_INFO("[INVITE:%p] SIP RX response: reason %.*s, status code %i",
inv,
std::string(msg->line.status.reason.ptr, msg->line.status.reason.slen).c_str(),
(int)msg->line.status.reason.slen, msg->line.status.reason.ptr,
msg->line.status.code);
sip_utils::logMessageHeaders(&msg->hdr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment