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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.orgrb/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.</div>
<div>By Terry Wilson.</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;">The infinite loop is happening somewhere inside the Berkeley DB sequence processing code, but I haven&#39;t been able to figure out where or how to fix it. This patch modifies our code to first look up the last entry in the db (which does not hit the infinite loop problem), and use its key as a sentinel value when we iterate over the loop. Since there were four places the code would have to be changed, I got rid of some duplicate code and made a utility function to handle all calls to astdb-&gt;seq.

What I would rather do is replace the Berkeley DB 1 code (which hasn&#39;t been updated in around 15 years) with sqlite3 which is actively maintained, in the public domain, and part of every distribution known to man. Having built-in sqlite3 + a realtime option seems much better than the current setup. Writing a conversion utility for our usage of BDB1 should be fairly trivial.</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;">Took a known corrupted DB and ensured the infinite loop was no longer a problem. Tried database put, show, del, and deltree to make sure that things worked as they did before.</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/main/db.c <span style="color: grey">(322168)</span></li>

</ul>

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




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




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