1.7.0: getnameinfo bug

Zhiming Zhou qexing@gmail.com
Thu Aug 6 12:48:00 GMT 2009


This bug happens on every 1.7.0 beta version.
I use getnameinfo function with NI_NUMERICHOST flag,

if the "sin_port" of sockaddr is a known port(like 21, 80...)
in "/etc/services" file, getnameinfo function works ok, and
service name is correctly fetched(ftp, http...).

however if I fill "sin_port" with an unknown port(like 6400, 6499)
getnameinfo returns EAI_NODATA, and if i add a 6400 or 6499 service
entry in "/etc/services" file, getnameinfo works ok again.

So, I move the code to Linux, it works ok either "sin_port" is known
or unknown, if port is known(like 21), service name is fetched(ftp),
if not(6400), service name is filled with port number(6400), and it
works very good :)

Any helps?
Thanks

Zhiming Zhou

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list