Follow-up Comment #3, bug #16509 (project freeciv):

I believe that file #10015, which adds NI_NAMEREQD to getnameinfo(), would
not fix this bug.

>From OpenBSD 'man getnameinfo':



     NI_NAMEREQD       A name is required.  If the host name cannot be found
                       in DNS and this flag is set, a non-zero error code is
                       returned.  If the host name is not found and the flag
                       is not set, the address is returned in numeric form.



If there is no host name, getnameinfo() provides a numeric address. With
NI_NAMEREQD, getnameinfo() would fail. When it fails, Freeciv uses the
numeric adddress from the earlier call to inet_ntop(). The entire effect of
file #10015 would be to use the numeric address instead of the numeric
address.

We can use NI_NAMEREQD because there is no reason to get the numeric address
again; but NI_NAMEREQD would not solve this bug. Or would it?

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16509>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to