<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/3329/">https://reviewboard.asterisk.org/r/3329/</a>
     </td>
    </tr>
   </table>
   <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/3329/diff/2/?file=56001#file56001line124" style="color: black; font-weight: bold; text-decoration: underline;">./asterisk/trunk/tests/agi/exit_status/run-test</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">124</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span>cleanup</pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">124</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        if event['application'] == 'AGI':</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;">Invert this test so you can return early and then drop the indentation of the remainder of the function.</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/3329/diff/2/?file=56001#file56001line142" style="color: black; font-weight: bold; text-decoration: underline;">./asterisk/trunk/tests/agi/exit_status/run-test</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">142</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">else</pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">142</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        if self.can_call:</pre></td>
  </tr>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">143</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span>success</pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">143</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            if event['exten'] != 'waiting':</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;">Invert these tests so you can return early and then drop the indentation of the remainder of the function.</pre>
</div>
<br />



<p>- opticron</p>


<br />
<p>On March 14th, 2014, 9:43 a.m. CDT, Benjamin Keith Ford 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 Benjamin Keith Ford.</div>


<p style="color: grey;"><i>Updated March 14, 2014, 9:43 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-19167">ASTERISK-19167</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
testsuite
</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;">Notes:
- Is a sub-task of ASTERISK-19167
- Ignore userA directory; will be removed from repository

This test runs through a few different AGI scripts to verify that AGISTATUS returns the correct values:
1. Attempts to run an AGI script that does not exist. AGISTATUS returns NOTFOUND.
2. Attempts to run an AGI script that has an invalid path. AGISTATUS returns FAILURE.
3. Attempts to run an AGI script that has a non-executable interpreter. AGISTATUS returns FAILURE.
4. Attempts to run an AGI script that is non-executable. AGISTATUS returns FAILURE.
5. Runs an AGI script that will be hung up on while waiting for a command. AGISTATUS returns HANGUP.
6. Runs an AGI script that will be hung up on while executing a command. AGISTATUS returns HANGUP.
7. Runs an AGI script that exits normally. AGISTATUS returns SUCCESS.</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>./asterisk/trunk/tests/agi/exit_status/waiting.agi <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/test-config.yaml <span style="color: grey">(4749)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/run-test <span style="color: grey">(4749)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/executing.agi <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/donothing.agi <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/configs/ast1/extensions.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/badinterpreter3.agi <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/badinterpreter2.agi <span style="color: grey">(PRE-CREATION)</span></li>

 <li>./asterisk/trunk/tests/agi/exit_status/badinterpreter.agi <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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







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








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