<p>Updated pull request with the following:</p>

<ul>
<li>add locks per rtpp_set_head and per rtpp_set</li>
<li>make rtpp_no shm counter (which only counts additions in the db because deletion is not handled); add rtpp_socks_size per process counter; rebuild rtpp_socks before selecting node; reassign active_set.</li>
</ul>

<p>I basically tested it and it works decent, taking in consideration the newly added nodes when selecting the node. We will be testing this code in our system.</p>

<p>Deletion of shm nodes won't be handled in this pull request mainly because of interaction with rtpengine hash table(in hashtable only pointers to shm nodes are kept to save memory).</p>

<p>Additional code feedback would be highly apreciated.</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/pull/429#issuecomment-173611266">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZVI4HG2klm0VnUm33xS0Fz9XG3NBks5pcPRCgaJpZM4Guvjo.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/pull/429#issuecomment-173611266"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>