<div dir="ltr"><div>Global variable and it&#39;s sad. Usually in callback functions void* context supposed.<br></div><div><br></div><div style>Dmitry.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/24 julien terrasson <span dir="ltr">&lt;<a href="mailto:julien.terrasson@gmail.com" target="_blank">julien.terrasson@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Hi again,<br><br>While trying to build my own esl outbound server (server_esl.c)<br>
</div></div><br>I found that a callback function was called from the main block whenever a socket is opened.<br>
</div><div><br></div></div><div>Prototype of MyCallBack is :<br>static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struct sockaddr_in *addr)<br></div><div><br></div>I would like to extend this prototype to communicate this callback function a Queue structure that is defined in the main thread.<br>

<br>Let&#39;s take an example :<br><br>int main(void)<br>{<br>    <br>    Queue *Q = createQueue(MaxNumberOfElements);<br>    if(pthread_create(&amp;thread1, NULL, processQueue, Q)) {<br>    esl_listen_threaded(&quot;localhost&quot;, 8084, mycallback, 100000);<br>

}<br><br></div>I would like to be able to pass myCallBack the Q structure so that i can queue up all the request incoming from freeswitch. But my knowledge of C is a bit dusty.<br>So it would be nice if i can get in touch with esl_listen_threaded coder so i can define the smartest way to extend the code to transmit a C struct to the callBack Function.. Can you help me to contact him ?<br>

</div></div><div><br></div>Regards,<br><br></div>Julien<br><div><div><div><div><div><br><br><br></div></div></div></div></div></div>
<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-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>