<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6385">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_t38:  Make t38_reinvite_response_cb tolerant of NULL channel<br><br>t38_reinvite_response_cb can get called by res_pjsip_session's<br>session_inv_on_tsx_state_changed in situations where session->channel<br>is NULL.  If it is, the ast_log warning segfaults because it tries<br>to get the channel name from a NULL channel.<br><br>* Check session->channel and print "unknown channel" when it's NULL.<br><br>ASTERISK-27236<br>Reported by: Ross Beer<br><br>Change-Id: I4326e288d36327f6c79ab52226d54905cdc87dc7<br>---<br>M res/res_pjsip_t38.c<br>1 file changed, 4 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c<br>index 9f6ae0c..82b1c92 100644<br>--- a/res/res_pjsip_t38.c<br>+++ b/res/res_pjsip_t38.c<br>@@ -294,21 +294,22 @@<br> {<br>        struct pjsip_status_line status = rdata->msg_info.msg->line.status;<br>     struct t38_state *state;<br>-     RAII_VAR(struct ast_sip_session_media *, session_media, NULL, ao2_cleanup);<br>+  struct ast_sip_session_media *session_media = NULL;<br> <br>        if (status.code == 100) {<br>             return 0;<br>     }<br> <br>- if (!(state = t38_state_get_or_alloc(session)) ||<br>+    if (!session->channel || !(state = t38_state_get_or_alloc(session)) ||<br>             !(session_media = ao2_find(session->media, "image", OBJ_KEY))) {<br>                 ast_log(LOG_WARNING, "Received response to T.38 re-invite on '%s' but state unavailable\n",<br>-                        ast_channel_name(session->channel));<br>+                      session->channel ? ast_channel_name(session->channel) : "unknown channel");<br>           return 0;<br>     }<br> <br>  t38_change_state(session, session_media, state, (status.code == 200) ? T38_ENABLED : T38_REJECTED);<br> <br>+       ao2_cleanup(session_media);<br>   return 0;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6385">change 6385</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6385"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I4326e288d36327f6c79ab52226d54905cdc87dc7 </div>
<div style="display:none"> Gerrit-Change-Number: 6385 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>