<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/3386/">https://reviewboard.asterisk.org/r/3386/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Other than a few red blobs to fix, looks good to go.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/3386/diff/1/?file=56421#file56421line22451" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/channels/chan_sip.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int func_header_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">22446</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew"> <span class="tb"> </span></span>if (ast_strlen_zero(data)) {</pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">22451</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew"> <span class="tb"> </span></span>if (ast_strlen_zero(data)) {</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix red while you're here.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/3386/diff/1/?file=56421#file56421line22642" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/channels/chan_sip.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int function_sipchaninfo_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">22632</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew"> <span class="tb"> </span></span>if (!data) {</pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">22642</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew"> <span class="tb"> </span></span>if (!data) {</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix red while you're here.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/3386/diff/1/?file=56428#file56428line99" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/funcs/func_dialplan.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int isexten_function_read(struct ast_channel *chan, const char *cmd, char *data,</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">99</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="tb">  </span><span class="n">res</span> <span class="o">=</span> <span class="n">ast_exists_extension</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">context</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">exten</span><span class="p">,</span> <span class="n">priority_num</span><span class="p">,</span><span class="ew"> </span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">99</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="tb">  </span><span class="n">res</span> <span class="o">=</span> <span class="n">ast_exists_extension</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">context</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">exten</span><span class="p">,</span> <span class="n">priority_num</span><span class="p">,</span><span class="ew"> </span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix red while you're here.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/3386/diff/1/?file=56428#file56428line114" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/funcs/func_dialplan.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int isexten_function_read(struct ast_channel *chan, const char *cmd, char *data,</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">112</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">res</span> <span class="o">=</span> <span class="n">ast_exists_extension</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">context</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">exten</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span><span class="ew"> </span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">114</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">res</span> <span class="o">=</span> <span class="n">ast_exists_extension</span><span class="p">(</span><span class="n">chan</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">context</span><span class="p">,</span> <span class="n">args</span><span class="p">.</span><span class="n">exten</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span><span class="ew"> </span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix red while you're here.</pre>
</div>
<br />



<p>- Tilghman Lesher</p>


<br />
<p>On March 25th, 2014, 12:18 a.m. UTC, Corey Farrell wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Corey Farrell.</div>


<p style="color: grey;"><i>Updated March 25, 2014, 12:18 a.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-23391">ASTERISK-23391</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is the Asterisk 12 version of fixes for dialplan functions handling of NULL channel.  The patch for trunk is identical to 12.  Patches for 1.8 and 11 are smaller, those patches are posted to JIRA.  I can post separate reviews for 1.8 and 11 if anyone asks.

Looking to the future, I think it would be better to add a 3rd bit-field to 'struct ast_custom_function' to allow_global, have pbx.c check if channel is NULL.  This would be cleaner with functions using RAII or SCOPED_CHANNELLOCK (main/features_config.c), and remove the check from a large number of functions.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Compiled, visually inspected.

I cannot compile app_jack due to dependencies, all other changed files compiled with devmode.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/branches/12/res/res_xmpp.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/res/res_pjsip_header_funcs.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/res/res_mutestream.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/res/res_jabber.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/res/res_calendar.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/main/message.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/main/features_config.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_volume.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_strings.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_speex.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_pitchshift.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_odbc.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_math.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_jitterbuffer.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_groupcount.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_global.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_frame_trace.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_dialplan.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_channel.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_cdr.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_callerid.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_callcompletion.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/funcs/func_blacklist.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/channels/pjsip/dialplan_functions.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/channels/chan_sip.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/channels/chan_iax2.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/apps/confbridge/conf_config_parser.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/apps/app_voicemail.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/apps/app_stack.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/apps/app_speech_utils.c <span style="color: grey">(410669)</span></li>

 <li>/branches/12/apps/app_jack.c <span style="color: grey">(410669)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/3386/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>