<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/1149/">https://reviewboard.asterisk.org/r/1149/</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 mlehner.</div>


<p style="color: grey;"><i>Updated 2011-03-29 01:41:00.189297</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Added database schema.</pre>
  </td>
 </tr>
</table>


<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;">event_type could not be an integer datatype in a ODBC database because an extra ast_strlen_zero() check was wrapped around the code that did the work. ast_strlen_zero() check is done in the second branch of the if statement, after the check for eventtype is done. Changes are very simple, just removing the &quot;overzealous&quot; ast_strlen_zero() check, while keeping braces to prevent compilation errors and warnings with variable re-definitions. </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;">Tested on a local install of Asterisk 1.8.3.2. Compiles and creates the expected records in the database. Database schema is as follows:

CREATE TABLE `cel_int` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `eventtype` int(11) NOT NULL,
  `eventtime` timestamp NOT NULL,
  `userdeftype` varchar(255) DEFAULT NULL,
  `cid_name` varchar(100) DEFAULT NULL,
  `cid_num` varchar(100) DEFAULT NULL,
  `cid_ani` varchar(100) DEFAULT NULL,
  `cid_rdnis` varchar(100) DEFAULT NULL,
  `cid_dnid` varchar(100) DEFAULT NULL,
  `exten` varchar(100) DEFAULT NULL,
  `context` varchar(100) DEFAULT NULL,
  `channame` varchar(100) DEFAULT NULL,
  `appname` varchar(100) DEFAULT NULL,
  `appdata` varchar(100) DEFAULT NULL,
  `accountcode` varchar(20) DEFAULT NULL,
  `peeraccount` varchar(100) DEFAULT NULL,
  `uniqueid` varchar(32) DEFAULT NULL,
  `linkedid` varchar(32) DEFAULT NULL,
  `amaflags` int(11) NOT NULL,
  `userfield` varchar(255) DEFAULT NULL,
  `peer` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;</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>/tags/1.8.3.2/cel/cel_odbc.c <span style="color: grey">(311686)</span></li>

</ul>

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




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




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