<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8681">View Change</a></p><p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think converting the string to an int is the right approach.  The origtime is a timestamp which has a varying integer size type depending upon the machine.  The time_t type could be "long int" or "long long int".</p><p style="white-space: pre-wrap; word-wrap: break-word;">In ASTERISK-27760, you said the MariaDB had a problem with the empty string and not a number string.  It seems that the MariaDB is treating the duration and origtime columns as "INTEGER NOT NULL" instead of "INTEGER" or "INTEGER NULL" type columns.  To avoid type conversion problems we should instead make sure that the duration and origtime strings are not empty in store_file() right before the call to ast_odbc_direct_execute().  If they are empty then we can substitute the "0" string instead.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (ast_strlen_zero(idata.origtime)) {<br>  idata.origtime = "0";<br>}<br>if (ast_strlen_zero(idata.duration)) {<br>  idata.duration = "0";<br>}</pre><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8681">change 8681</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8681"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I8543ad480a08c98be78bde1ee870e6e6c84b2c5b </div>
<div style="display:none"> Gerrit-Change-Number: 8681 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Nic Colledge <nic@njcolledge.net> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Nic Colledge <nic@njcolledge.net> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 10 Apr 2018 20:09:24 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>