<p>In both 4.4.1 and master, the recently added "flags" and "reg_delay" columns are not read if the database lacks DB_CAP_FETCH capability. uac.reg_dump shows them as some large random values.</p>

<p>The issue is in uac_reg.c:uac_reg_load_db().</p>

<p><code>if (DB_CAPABILITY(reg_dbf, DB_CAP_FETCH)) {<br>
        if(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 12, 0, 0) < 0)</code></p>

<p>... so if the database has DB_CAP_FETCH capability, 12 columns are read; however, if not...</p>

<p><code>} else {<br>
        if((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols,<br>
                        0, 10, 0, &db_res))!=0<br>
                || RES_ROW_N(db_res)<=0 )<br>
        {</code> </p>

<p>only 10 columns are read, missing the last two (flags and reg_delay)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/640">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZYew6Nc0TBrIDaVogS2i61Pxs7p8ks5qFIxVgaJpZM4Imy4h.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/640"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>