From 07f35f68e00b48ad6ec4d18c628d0bb57bad85ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 Jun 2002 06:44:37 +0000 Subject: - completely rewrote the wins_srv.c code. It is now much simpler, and gives us a good grounding to properly support multiple wins servers for different interfaces (which will be coming soon ...) - fixed our wins registration failover code to actually do failover! We were not trying to register with a secondary wins server at all when the primary was down. We now fallback correctly. - fixed the multi-homed name registration packets so that they work even in a non-connected network (ie. when one of our interfaces is not routable from the wins server. Yes, this really happens in the real world). (This used to be commit a049360d5b0d95a935b06aad43efc17d34de46dc) --- source3/libsmb/namequery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index a97270b7d4..d709f997f5 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -603,10 +603,12 @@ BOOL name_register_wins(const char *name, int name_type) if (0 == wins_srv_count()) return False; + sendto_ip = wins_srv_ip(); + if( DEBUGLVL( 4 ) ) { dbgtext( "name_register_wins: Registering my name %s ", name ); - dbgtext( "with WINS server %s.\n", wins_srv_name() ); + dbgtext( "with WINS server %s.\n", inet_ntoa(sendto_ip)); } sock = open_socket_in( SOCK_DGRAM, 0, 3, @@ -616,8 +618,6 @@ BOOL name_register_wins(const char *name, int name_type) set_socket_options(sock, "SO_BROADCAST"); /* ????! crh */ - sendto_ip = wins_srv_ip(); - if (num_interfaces > 1) { for (i = 0; i < num_interfaces; i++) { -- cgit