*** empty log message ***

svn path=/trunk/boinc/; revision=5405
This commit is contained in:
Rom Walton 2005-02-11 22:48:17 +00:00
parent 02271491ae
commit 2298daa8b6
2 changed files with 19 additions and 1 deletions

View File

@ -24595,3 +24595,10 @@ Janus 11 Feb 2005
languages/translations/
en.po
Rom 11 Feb 2005
- Bug Fix: Check to see if the hostname given to us is in dotted decimal
notation, if so, convert it into an ip address, otherwise pass it to
a name resolution service.
client/
net_xfer.C

View File

@ -117,13 +117,24 @@ int NET_XFER::get_ip_addr(int &ip_addr) {
}
int NET_XFER::get_ip_addr(char *hostname, int &ip_addr) {
hostent* hep;
#ifdef WIN32
int retval;
retval = NetOpen();
if (retval) return retval;
#endif
// Check to see if the hostname is in Internet Standard dotted notation,
// if so, return that address instead of hitting the various
// name resolution services.
int temp_ip_addr = inet_addr(hostname);
if (-1 != temp_ip_addr) {
ip_addr = temp_ip_addr;
return 0;
}
// The hostname is really a name that we must resolve.
hostent* hep;
hep = gethostbyname(hostname);
if (!hep) {
char msg[256];