Commit efbf5e75 authored by Tristan Matthews's avatar Tristan Matthews

* #9847: SIPVoipLink: gracefully handle invalid pointers

parent 4c938510
......@@ -1411,14 +1411,13 @@ void outgoing_request_forked_cb(pjsip_inv_session * /*inv*/, pjsip_event * /*e*/
void transaction_state_changed_cb(pjsip_inv_session * inv,
pjsip_transaction *tsx, pjsip_event *event)
{
assert(tsx);
assert(event);
if (tsx->role != PJSIP_ROLE_UAS || tsx->state != PJSIP_TSX_STATE_TRYING)
if (!tsx or !event or tsx->role != PJSIP_ROLE_UAS or
tsx->state != PJSIP_TSX_STATE_TRYING)
return;
if (pjsip_method_cmp(&tsx->method, &pjsip_refer_method) ==0) {
onCallTransfered(inv, event->body.tsx_state.src.rdata); /** Handle the refer method **/
// Handle the refer method
if (pjsip_method_cmp(&tsx->method, &pjsip_refer_method) == 0) {
onCallTransfered(inv, event->body.tsx_state.src.rdata);
return;
}
......
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