From 64f0348a3f994334abe64a4d4896109c3c8c9039 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 13 Dec 1997 14:16:07 +0000 Subject: 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) --- source3/client/clientutil.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/client/clientutil.c') 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); } -- cgit