From b35f21fb3a19417e2aab82a573ff121a086b224c Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Wed, 19 Jul 2000 01:21:30 +0000 Subject: 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 -)----- (This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d) --- source3/param/loadparm.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 3650d4edd3..61e38bea60 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -509,6 +509,7 @@ static BOOL handle_vfs_object(char *pszParmValue, char **ptr); static BOOL handle_source_env(char *pszParmValue, char **ptr); static BOOL handle_netbios_name(char *pszParmValue, char **ptr); static BOOL handle_winbind_id(char *pszParmValue, char **ptr); +static BOOL handle_wins_server_list(char *pszParmValue, char **ptr); static void set_server_role(void); static void set_default_server_announce_type(void); @@ -863,7 +864,7 @@ static struct parm_struct parm_table[] = { {"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, {"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, - {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, NULL, NULL, FLAG_BASIC}, + {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, {"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, @@ -2372,6 +2373,19 @@ static BOOL handle_winbind_id(char *pszParmValue, char **ptr) return True; } +/*************************************************************************** + Handle the WINS SERVER list +***************************************************************************/ +static BOOL handle_wins_server_list( char *pszParmValue, char **ptr ) + { + if( !wins_srv_load_list( pszParmValue ) ) + return( False ); /* Parse failed. */ + + string_set( ptr, pszParmValue ); + return( True ); + } + + /*************************************************************************** initialise a copymap ***************************************************************************/ -- cgit