Comment 2 for bug 1689087

Revision history for this message
Notabilis (notabilis27) wrote :

I'm glad that you approve. Maybe you can help me with a piece of the current networking code. At multiple places, e.g. in network/SDLNet_ResolveHost.cc after line 100 [1], we are resolving the hostname by gethostbyname() only to overwrite the result again a few lines later by a call to SDLNet_ResolveHost().
The only reason I can see is that someone used gethostbyname() to check whether the resolution is possible at all. This can also be done by checking the return value of SDLNet_ResolveHost(), but maybe that was overlooked? If you don't have any idea either I will drop the gethostbyname() call.

[1] https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/network/internet_gaming.cc#L100