<p>Does it work either way?<br>
I guess another good question is what&#39;s the difference?  </p>
<p>If you have a problem or refactoring the code has merit.  Submit a patch to Jira and provide details.</p>
<div class="gmail_quote">On Jul 25, 2013 4:43 AM, &quot;Iwan Budi Kusnanto&quot; &lt;<a href="mailto:ibk@labhijau.net">ibk@labhijau.net</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
Just curious, why use SSL_read in do_dtls() [1] while in the same time<br>
Freeswitch use BIO_write.<br>
Just wondering why not use BIO_read.<br>
<br>
I replaced SSL_read with BIO_read and it is working fine with chrome<br>
for few calls.<br>
Not intensive test actually.<br>
So, the line become if (BIO_read(dtls-&gt;write_bio, dtls-&gt;data,<br>
dtls-&gt;bytes) == (int)dtls-&gt;bytes)<br>
<br>
Another question, still in do_dtls() about this line:<br>
BIO_write(dtls-&gt;read_bio, dtls-&gt;data, dtls-&gt;bytes)<br>
<br>
Why use dtls-&gt;read_bio in write operation?<br>
<br>
Why also need dtls-&gt;write_bio in my BIO_read above.<br>
It seems weird for me<br>
<br>
[1]<a href="https://github.com/FreeSWITCH/FreeSWITCH/blob/master/src/switch_rtp.c#L2376" target="_blank">https://github.com/FreeSWITCH/FreeSWITCH/blob/master/src/switch_rtp.c#L2376</a><br>
<br>
--<br>
Iwan Budi Kusnanto<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div>