Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: Hostname lookups again.
Home

[Freeciv-Dev] Re: Hostname lookups again.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Hostname lookups again.
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Tue, 19 Sep 2000 01:59:35 +0100 (WET DST)

On 18 Sep 2000, Gaute B Strokkenes wrote:

> 
> Some time ago I submitted a patch to clean up the way that Freeciv
> looks up hostnames and fix a few bugs.  That patch has seemingly
> vanished into a great black hole, with no reply...  Since then,
> someone actually complained about one of the bugs that I fixed, and
> confirmed that my fix works.  And you know what they say; for each
> person that bothers to complain there are a dozen that just give up.

Sorry.  I really didn't see your report (for one) anyway...

> I have attached a (slighly) updated version.  It's a very
> straightforward fix.  It would be great if someone gave me some
> feedback, or just applied the damn thing...

Well, i really don't see why you're making all those checks to see if a
name is of the AF_INET family in look up using gethostbyname().  It's not
like DNS is used for non IP stuff...  as far as i know...  And it's not
like replacing the memcpy()'s with attributions is doing much too.

-  if(isdigit((size_t)*hostname)) {

Now this is something, if a name is like 123-rules.com it won't do a
hostname lookup this must be fixed.

And about removing '#define INADDR_NONE' i dunno why that is there in the
first place but there must be a reason. :-)

And we probably could use inet_aton() instead of inet_addr() since the
Linux man page says it's obsolete (funny hadn't noticed that before).

If it doesn't break any platform support of course.


Feel free to comment.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




[Prev in Thread] Current Thread [Next in Thread]