<p>Well replacing this :</p>

<div class="highlight highlight-C++"><pre><span class="pl-k">if</span> (dbmode != RLS_DB_ONLY)</pre></div>

<p>By this :</p>

<div class="highlight highlight-C++"><pre><span class="pl-k">if</span>(get_to(msg)->tag_value.s==<span class="pl-c1">NULL</span> || get_to(msg)->tag_value.len==<span class="pl-c1">0</span>)</pre></div>

<p>Which is a detection of initial transaction if I'am understanding well (no to tag). There is such a detection upper in the code (line 610-611) :</p>

<div class="highlight highlight-C++"><pre>    <span class="pl-k">if</span>(get_to(msg)->tag_value.s==<span class="pl-c1">NULL</span> || get_to(msg)->tag_value.len==<span class="pl-c1">0</span>)
    { <span class="pl-c">/* initial Subscribe */</span></pre></div>

<p>But I was afraid that the test dbmode != RLS_DB_ONLY wasn't here for nothing (Maybe performance reasons ?)</p>

<p>I ran my test 10 times and everything seems OK for now.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/276#issuecomment-128709229">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZTW4SRll9O18eVaLcGl3PfOC_wnDks5olLKtgaJpZM4Fm-Td.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/276#issuecomment-128709229"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>