/"Aren't you using not reentrant function gethostbyname instead of reentrant
gethostbyname_r?"/
I'm using the sofia resolver, it does not use the gethostbyname function.
Nickolay V. Shmyrev a écrit :
Hello,
I'm still working on the Sofia-resolver, and I have some trouble with
the multi-threading management in Sofia.
In my case I have a program that is listening on an IPC message queue.
This program receives addresses from queue and have to solve them
(following the RFC3263).
I have then modified Sofia to fit my goals.
With one thread I have no problem, the resolver is working properly. I
mean it receives a message from queue, resolve the address and return to
the application.
The resolver is working like this:
call of the a function :
resolve(char *address);
and then it makes an infinite loop to listen for DNS answers :
while(resolution is not finished)
su_root_step(my_root_object,500L);
and it handles the results.
I have tried several things to use multi threads, but without any
success. ( Assertion `(su_port_own_thread(parent->sur_task->sut_port))'
failed. )
I can not launch a su_clone_start(my_root_object), in a different thread.
How can I resolve simultaneously several DNS addresses?
I hope I made myself clear,
Thank you,
Thomas.
Aren't you using not reentrant function gethostbyname instead of reentrant
gethostbyname_r?
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel