From 7f0b3ec809ce0a8804353b81d8252e11a0d01add Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Wed, 29 Aug 2001 03:30:52 +0000 Subject: Patched to ensure that it won't break HEAD. This isn't the final version, of course, I still need to get WINS failover working. This is just patched so it won't need lp_wins_server() (which I renamed to lp_wins_server_list()). I can't compile just now as something else is broken in HEAD. Let me know if this version of namequery.c causes trouble down the line. Shouldn't, as the changes are very small, but I've been known to rock the boat before. Chris -)----- (This used to be commit 29c6efc9564e51dc28e8434bdc86079c6502d73d) --- source3/libsmb/namequery.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index a0fb366f1b..6cfc421c83 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -564,19 +564,23 @@ BOOL name_register_wins(const char *name, int name_type) * Do a broadcast register ... */ - if (!lp_wins_server()) + if (0 == wins_srv_count()) return False; - DEBUG(4, ("name_register_wins:Registering my name %s on %s\n", name, lp_wins_server())); + if( DEBUGLVL( 4 ) ) + { + dbg_text( "name_register_wins: Registering my name %s ", name ); + dbg_text( "with WINS server %s.\n", wins_srv_name() ); + } - sock = open_socket_in(SOCK_DGRAM, 0, 3, - interpret_addr("0.0.0.0"), True); + sock = open_socket_in( SOCK_DGRAM, 0, 3, + interpret_addr("0.0.0.0"), True ); if (sock == -1) return False; - set_socket_options(sock, "SO_BROADCAST"); + set_socket_options(sock, "SO_BROADCAST"); /* ????! crh */ - sendto_ip.s_addr = inet_addr(lp_wins_server()); + sendto_ip = wins_srv_ip(); if (num_interfaces > 1) { -- cgit