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.
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( ). ResolveHost( ), but maybe that was overlooked? If you don't have any idea either I will drop the gethostbyname() call.
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_
[1] https:/ /bazaar. launchpad. net/~widelands- dev/widelands/ trunk/view/ head:/src/ network/ internet_ gaming. cc#L100