<p>There is a shm memory leak because the data is not allocated along with the evapi_relay_cmd structure.</p>

<p>Also, the indentation seems to be done with whitespaces instead of tabs, breaking the formatting of the blocks.</p>

<p>Thinking more of it, I think it could be rather hard to match on source IP and port for tcp connections, because the kernel may allocate random ports, even one tries to bind on a specific one.</p>

<p>Maybe we can add sort of connection tagging (or channel name) - when the connection is open by the client app, it gives the tag/channel name. Or eventually, a new function can be exported to set the tag/channel name inside the event_route[evapi:connection-new]. The tag/channel name will be a new field in the connection structure. Then the evapi relay will match on this name rather than source ip port. What do you think?</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/pull/596#issuecomment-216663484">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZbhJ2VEWxcCc74PHLAFnsDFXQktnks5p97fEgaJpZM4IWQgE.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/596#issuecomment-216663484"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>