diff options
author | Christopher R. Hertel <crh@samba.org> | 2000-07-19 01:21:30 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 2000-07-19 01:21:30 +0000 |
commit | cc08bdc74f4cd111fdc582ee7babef47ed8a950d (patch) | |
tree | 7e67fd511973cd47d8ac581803890415c4873e5c /source/libsmb/namequery.c | |
parent | 1b718f67675e52520f193a8c71c110246e70723f (diff) | |
download | samba-cc08bdc74f4cd111fdc582ee7babef47ed8a950d.tar.gz |
First cut toward adding WINS server failover.
*Note: failover doesn't actually work yet!* It's just that the code I'm
adding provides all of the pieces necessary.
I do have one big question. Something that I'll have to ask Jeremy, I'm
thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to
set up the Unicast subnet.
...so what happens if the WINS server changes?
My guess is either:
a) nothing.
b) I'd have to change the unicast subnet entry whenever the WINS server
changes.
Urq.
BTW, the lp_wins_server() function no longer returns the WINS server name
or IP. It returns the list of WINS servers entered in smb.conf. To get
the currently 'live' WINS server, use the wins_srv() function.
Fun, eh?
Chris -)-----
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r-- | source/libsmb/namequery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 193731768f4..0237a9752f8 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -529,12 +529,12 @@ static BOOL resolve_wins(const char *name, int name_type, DEBUG(3,("resolve_wins: Attempting wins lookup for name %s<0x%x>\n", name, name_type)); - if(!*lp_wins_server()) { - DEBUG(3,("resolve_wins: WINS server resolution selected and no WINS server present.\n")); + if( wins_srv_count() < 1 ) { + DEBUG(3,("resolve_wins: WINS server resolution selected and no WINS servers listed.\n")); return False; } - wins_ip = *interpret_addr2(lp_wins_server()); + wins_ip = *interpret_addr2( wins_srv() ); wins_ismyip = ismyip(wins_ip); DEBUG(3, ("resolve_wins: WINS server == <%s>\n", inet_ntoa(wins_ip)) ); |