<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/1521/">https://reviewboard.asterisk.org/r/1521/</a>
     </td>
    </tr>
   </table>
   <br />


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

<div>Review request for Asterisk Developers, Tilghman Lesher and wdoekes.</div>
<div>By Terry Wilson.</div>


<p style="color: grey;"><i>Updated Oct. 12, 2011, 8:54 p.m.</i></p>




<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;">config.h does not document what ast_realtime_load_multientry should return in the case of no results being returned. Several backends return an empty ast_config. This has caused at least one error in chan_sip where a non-NULL result was assumed to mean that there were results returned. After discussions on IRC, it was agreed that returning NULL for no results made sense and resulted in simpler code. Instead of hunting down the inconsistencies in each backend, this patch destroys empty ast_configs and returns NULL inside the API call.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing (updated)</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;">I ran my SIP realtime tests and verified that the incorrect conditional branch was no longer taken. I also looked at every usage of ast_load_realtime_multientry to verify that a NULL result for no rows would be safe. It is. Every call checks for NULL and none look like they would behave differently. Every place just iterates over the results (except the call in chan_sip which tested NULL as a test for &quot;no results&quot;).</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/1.8/include/asterisk/config.h <span style="color: grey">(340521)</span></li>

 <li>/branches/1.8/main/config.c <span style="color: grey">(340521)</span></li>

</ul>

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




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




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