summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-12-13 14:16:07 +0000
committerJeremy Allison <jra@samba.org>1997-12-13 14:16:07 +0000
commit64f0348a3f994334abe64a4d4896109c3c8c9039 (patch)
tree50867cc9ccbc060ceb46ea1e8f8bd8ec2a8ca05e /source3/client
parent164c9db4de87ea851a631f1c9d431e0a4525802e (diff)
downloadsamba-64f0348a3f994334abe64a4d4896109c3c8c9039.tar.gz
samba-64f0348a3f994334abe64a4d4896109c3c8c9039.tar.bz2
samba-64f0348a3f994334abe64a4d4896109c3c8c9039.zip
This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy. (This used to be commit d80b0cb645f81d16734929a0b27a91c6650499bb)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/clientutil.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/client/clientutil.c b/source3/client/clientutil.c
index 4064dbecd7..bf49c6b342 100644
--- a/source3/client/clientutil.c
+++ b/source3/client/clientutil.c
@@ -891,15 +891,18 @@ BOOL cli_open_sockets(int port )
{
#ifdef USENMB
/* Try and resolve the name with the netbios server */
- int bcast;
+ int bcast, count;
+ struct in_addr *ip_list;
if ((bcast = open_socket_in(SOCK_DGRAM, 0, 3,
interpret_addr(lp_socket_address()))) != -1) {
set_socket_options(bcast, "SO_BROADCAST");
- if (name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
- &dest_ip,0)) {
- failed = False;
+ if ((ip_list = name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
+ &count,0)) {
+ dest_ip = ip_list[0];
+ free(ip_list);
+ failed = False;
}
close (bcast);
}