<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10015">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_fax: Handle fax gateway being started more than once.<br><br>The T.38 fax gateway state machine can cause the fax gateway<br>to be started more than once on a channel depending on the<br>responses of the remote endpoint. This would previously leak<br>the channel name, channel unique id, and underlying fax engine<br>state. This change instead makes it so that if the fax gateway<br>session is already present and not reserved the fax gateway<br>is not started again.<br><br>ASTERISK-27981<br><br>Change-Id: I552d95086860cb18f2522ee40ef47b13b6da2e0e<br>---<br>M res/res_fax.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_fax.c b/res/res_fax.c</span><br><span>index 823d560..ce5687d 100644</span><br><span>--- a/res/res_fax.c</span><br><span>+++ b/res/res_fax.c</span><br><span>@@ -2914,6 +2914,11 @@</span><br><span> struct ast_fax_session *s;</span><br><span> int start_res;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* if the fax gateway is already started then do nothing */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (gateway->s && gateway->s->state != AST_FAX_STATE_RESERVED) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* create the FAX session */</span><br><span> if (!(s = fax_session_new(details, chan, gateway->s, gateway->token))) {</span><br><span> gateway->token = NULL;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10015">change 10015</a>. To unsubscribe, or for help writing mail filters, 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/10015"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I552d95086860cb18f2522ee40ef47b13b6da2e0e </div>
<div style="display:none"> Gerrit-Change-Number: 10015 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: 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>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>