OK, fixed the C-isms.

I'd imagine most modern systems should support getaddrinfo by now. (At
least Linux and BSD, Solaris might not). But anyway it probably is the
only re-entrant safe alternative (gethostbyname2 and gethostname_r being
GNU extensions).

--RZ

** Changed in: linuxdcpp
       Status: Confirmed => Fix Committed

-- 
Socket::resolve isn't thread safe
https://bugs.launchpad.net/bugs/590359
You received this bug notification because you are a member of LinuxDC++
Team, which is subscribed to LinuxDC++.

Status in DC++: Fix Committed
Status in Linux DC++: Fix Committed

Bug description:
gethostbyname() shouldn't be called from multiple threads in Linux. As it may 
return pointer to static data that will be overwritten by the next call. (And 
based on the few stacktraces I've seen lately it is overwritten.) Windows seems 
to allocate the data for gethostbyname from thread local storage, so that will 
probably explain why it took so long to be reported.



_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to