summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 319a77beb6..4585c8a544 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/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;
}