Skip to content
Snippets Groups Projects
Commit 0a306195 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #10090: fix segfault in transaction_state_changed_cb

parent 3953a176
Branches
No related tags found
No related merge requests found
......@@ -1488,7 +1488,12 @@ void transaction_state_changed_cb(pjsip_inv_session * inv,
// Get the message inside the transaction
pjsip_rx_data *r_data = event->body.tsx_state.src.rdata;
std::string formattedMessage(static_cast<char*>(r_data->msg_info.msg->body->data));
if (!r_data->msg_info.msg->body)
return;
const char *formattedMsgPtr = static_cast<const char*>(r_data->msg_info.msg->body->data);
if (!formattedMsgPtr)
return;
std::string formattedMessage(formattedMsgPtr, strlen(formattedMsgPtr));
// Try to determine who is the recipient of the message
SIPCall *call = static_cast<SIPCall *>(inv->mod_data[mod_ua_.id]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment