diff options
Diffstat (limited to 'source/libsmb/clientgen.c')
-rw-r--r-- | source/libsmb/clientgen.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 319a77beb65..4585c8a5441 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -1343,13 +1343,9 @@ BOOL cli_connect(struct cli_state *cli, char *host, struct in_addr *ip) fstrcpy(cli->desthost, host); if (!ip) { - struct hostent *hp; - - if ((hp = Get_Hostbyname(cli->desthost)) == 0) { - return False; - } - - putip((char *)&dest_ip,(char *)hp->h_addr); + if(!resolve_name( cli->desthost, &dest_ip)) { + return False; + } } else { dest_ip = *ip; } |