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 | 40ae638866e3d826ccd5d827672634959c31b039 (patch) | |
tree | 18a3789a835d249d43a34e436d135ed166bdbcc8 | |
parent | cfbf78085d48671e5be382e7486953a85a893be1 (diff) | |
download | samba-40ae638866e3d826ccd5d827672634959c31b039.tar.gz samba-40ae638866e3d826ccd5d827672634959c31b039.tar.xz samba-40ae638866e3d826ccd5d827672634959c31b039.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 -)-----
-rw-r--r-- | source/libsmb/namequery.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 6550d552066..6e0bf3375e2 100644 --- a/source/libsmb/namequery.c +++ b/source/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; } |