Hi again,
While trying to build my own esl outbound server (server_esl.c)
I found that a callback function was called from the main block whenever a socket is opened.
Prototype of MyCallBack is :
static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struct sockaddr_in *addr)
I would like to extend this prototype to communicate this callback function a Queue structure that is defined in the main thread.
Let's take an example :
int main(void)
{
Queue *Q = createQueue(MaxNumberOfElements);
if(pthread_create(&thread1, NULL, processQueue, Q)) {
esl_listen_threaded("localhost", 8084, mycallback, 100000);
}
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.
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 ?