<div>
                    cool, I used it and no problem been found till now.</div>
                 
                <p style="color: #A0A0A8;">On Wednesday, February 1, 2012 at 12:03 AM, Anthony Minessale wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>ya, you're right.</div><div>Fixed in tree....</div><div><br></div><div><br></div><div>On Tue, Jan 31, 2012 at 3:51 AM, Seven Du &lt;<a href="mailto:dujinfang@gmail.com">dujinfang@gmail.com</a>&gt; wrote:</div><blockquote type="cite"><div><div>Hi,</div><div><br></div><div>I tried to replace the following function which I copied somewhere in msrp.c</div><div>with &nbsp;switch_stun_random_string&nbsp;but I found</div><div>sometimes&nbsp;switch_stun_random_string&nbsp;returns identical strings on two</div><div>sequential calls, with the following function I never found, so I still use</div><div>it.</div><div><br></div><div>By looking the code I understand srand seed is time based so it's possible</div><div>to return duplicate random string, but I</div><div>found&nbsp;switch_stun_random_string&nbsp;used in some places other than stun, just</div><div>curious would it cause problems?</div><div><br></div><div>void random_string(char *buf, switch_size_t size)</div><div>{</div><div>long val[4];</div><div>int x;</div><div><br></div><div>for (x = 0; x &lt; 4; x++)</div><div>val[x] = random();</div><div>snprintf(buf, size, "%08lx%08lx%08lx%08lx", val[0], val[1], val[2], val[3]);</div><div>*(buf+size) = '\0';</div><div>}</div><div><br></div><div>Thanks.</div><div><br></div><div>--</div><div>About: <a href="http://about.me/dujinfang">http://about.me/dujinfang</a></div><div>Blog: <a href="http://www.dujinfang.com">http://www.dujinfang.com</a></div><div>Proj: &nbsp;<a href="http://www.freeswitch.org.cn">http://www.freeswitch.org.cn</a></div><div><br></div><div>Sent with Sparrow</div><div><br></div><div><br></div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com">http://www.cudatel.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div><div><a href="http://www.cluecon.com">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-dev mailing list</div><div><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a></div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div></div></blockquote><div><br></div><div><br></div><div><br></div><div>-- </div><div>Anthony Minessale II</div><div><br></div><div>FreeSWITCH <a href="http://www.freeswitch.org">http://www.freeswitch.org</a>/</div><div>ClueCon <a href="http://www.cluecon.com">http://www.cluecon.com</a>/</div><div>Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a></div><div><br></div><div>AIM: anthm</div><div>MSN:<a href="mailto:anthony_minessale@hotmail.com">anthony_minessale@hotmail.com</a></div><div>GTALK/JABBER/PAYPAL:<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a></div><div>IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch</div><div><br></div><div>FreeSWITCH Developer Conference</div><div>sip:<a href="mailto:888@conference.freeswitch.org">888@conference.freeswitch.org</a></div><div>googletalk:<a href="mailto:conf+888@conference.freeswitch.org">conf+888@conference.freeswitch.org</a></div><div>pstn:+19193869900</div><div><br></div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com">http://www.cudatel.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div><div><a href="http://www.cluecon.com">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-dev mailing list</div><div><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a></div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>