<p>Yes, I understood your logic in the original code, but you spare couple of mem allocs (which btw, are pretty fast) with the downside of searching and matching the resources - imho the effort of all those memcmp is comparable with the effort of 3-4 extra allocs (usually the list of used resources is relatively small). And I opted for this approach because code is simpler and more clear.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/345#issuecomment-71684090">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciaabETrjyB-4r1XsOVfEergrfMXIks5nl7uTgaJpZM4CpiN1.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/OpenSIPS/opensips/pull/345#issuecomment-71684090"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>