1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Correctly check for inet_addr fail. Patch from gregor.7@osu.edu.

Jeremy.
(This used to be commit 01f6b26945)
This commit is contained in:
Jeremy Allison 2003-02-17 21:19:00 +00:00
parent 585d50c667
commit 3fe0de1fcf

View File

@ -809,8 +809,11 @@ static BOOL internal_resolve_name(const char *name, int name_type,
}
if(is_address) {
/* if it's in the form of an IP address then get the lib to interpret it */
(*return_iplist)->s_addr = inet_addr(name);
} else {
if (((*return_iplist)->s_addr = inet_addr(name)) == 0xFFFFFFFF ){
DEBUG(1,("internal_resolve_name: inet_addr failed on %s\n", name));
return False;
}
} else {
(*return_iplist)->s_addr = allones ? 0xFFFFFFFF : 0;
*return_count = 1;
}