From 726e7e256e9c6d9767dea6cc600b75522ee84f07 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Fri, 11 Aug 2000 22:29:44 +0000 Subject: First shot at actually *doing* WINS failover. If libsmb/namequery.c:name_query() times out while doing a non-broadcast query, I mark that WINS server 'dead'. Note that I don't try the new WINS server. I think I can get that working too. This is only for queries, not registrations. The biggest problem is that I may have to fiddle with the UNICAST SUBNET, but I need to check talk that over with someone (Jeremy?) before I hack at it. I can't actually test the above change, I'm 'fraid. I'm getting: 4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c". in head branch. Chris -)----- (This used to be commit 40ae638866e3d826ccd5d827672634959c31b039) --- source3/libsmb/namequery.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 6550d55206..6e0bf3375e 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -298,7 +298,7 @@ struct in_addr *name_query(int fd,const char *name,int name_type, dbgtext( "Unsupported request error.\n" ); break; case 0x05: - dbgtext( "Refused error.\n" ); + dbgtext( "Query refused error.\n" ); break; default: dbgtext( "Unrecognized error code.\n" ); @@ -348,6 +348,13 @@ struct in_addr *name_query(int fd,const char *name,int name_type, } } + /* Reach here if we've timed out waiting for replies.. */ + if( !bcast && !found ) + { + /* Timed out wating for WINS server to respond. Mark it dead. */ + wins_srv_died( to_ip ); + } + return ip_list; } -- cgit