<br><div class="gmail_quote">On Sat, Jan 31, 2009 at 3:53 AM, Luciano Afranllie <span dir="ltr">&lt;<a href="mailto:listas.luafran@gmail.com">listas.luafran@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Thu, Jan 29, 2009 at 3:04 PM, mayamatakeshi &lt;<a href="mailto:mayamatakeshi@gmail.com">mayamatakeshi@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt; If I start a second instance of kamailio by mistake, if the cfg file<br>
&gt; instructs it to listen to tcp ports, the second instance will exit with<br>
&gt; something like this:<br>
&gt; tcp_init: bind(7, 0x81b28ec, 16) on <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a> : Address already in use<br>
&gt;<br>
&gt; But if the cfg file only instructs kamailio to bind to udp ports, the second<br>
&gt; instance will not exit. Is this a bug?<br>
&gt;<br>
&gt; I&#39;m curious because if we start kamailio and a udp port is in use by another<br>
&gt; application (not kamailio), kamailio will exit with<br>
&gt; udp_init: bind(4, 0x819f274, 16) on <a href="http://192.168.88.29" target="_blank">192.168.88.29</a>: Address already in use<br>
&gt; Why is that so?<br>
<br>
</div></div>That behavior may be possible if kamailio is setting SO_REUSEADDR<br>
socket option for udp but not for tcp.<br>
</blockquote></div><br>Thanks Luciano,<br>I didn&#39;t know about that.<br>And you are right. As we can see at udp_server.c:<br><br>setsockopt(sock_info-&gt;socket, SOL_SOCKET, SO_REUSEADDR , ...<br><br>regards,<br>mayama<br>
<br>