summaryrefslogtreecommitdiffstats
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-03-10 16:01:41 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-11 11:27:48 +1100
commite999472e36076e432187371b0853b887effe1067 (patch)
treed6dba34f70f1a7179ddf3e45c04074c7564fb3d1 /source4/libcli/raw
parent1af2cd2bd1c74c88dd00088eb37ad6286af7561f (diff)
downloadsamba-e999472e36076e432187371b0853b887effe1067.tar.gz
samba-e999472e36076e432187371b0853b887effe1067.tar.xz
samba-e999472e36076e432187371b0853b887effe1067.zip
s4:libcli Use integrated name resolution when connecting SMB
This avoids pulling the address into a string and back again if given a name, by letting the next async layer down do the name resolution. If it was an IP address to start with, then the resolver library just converts that to the struct socket_address. Andrew Bartlett
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clisocket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index 02da4917e3..84bf250f6a 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -80,6 +80,10 @@ struct composite_context *smbcli_sock_connect_send(TALLOC_CTX *mem_ctx,
}
state->socket_options = talloc_reference(state, socket_options);
+ if (!host_addr) {
+ host_addr = host_name;
+ }
+
ctx = socket_connect_multi_send(state, host_addr,
state->num_ports, state->ports,
resolve_ctx,