diff options
author | Christopher R. Hertel <crh@samba.org> | 2000-08-11 22:29:44 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 2000-08-11 22:29:44 +0000 |
commit | 726e7e256e9c6d9767dea6cc600b75522ee84f07 (patch) | |
tree | cfb62bf78317669e3b42ce56a9b50cdcb3c01ffb /source3 | |
parent | 295d684f538ccb1e7e7cef886791eec68d937f3f (diff) | |
download | samba-726e7e256e9c6d9767dea6cc600b75522ee84f07.tar.gz samba-726e7e256e9c6d9767dea6cc600b75522ee84f07.tar.bz2 samba-726e7e256e9c6d9767dea6cc600b75522ee84f07.zip |
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)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/namequery.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |