summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2000-07-19 01:21:30 +0000
committerChristopher R. Hertel <crh@samba.org>2000-07-19 01:21:30 +0000
commitb35f21fb3a19417e2aab82a573ff121a086b224c (patch)
treeb7974de2306b6afbb0bdc20b70689565dd10e6fa /source3/param
parentac56d8f848ab6d057cee84ee85945594b65597c4 (diff)
downloadsamba-b35f21fb3a19417e2aab82a573ff121a086b224c.tar.gz
samba-b35f21fb3a19417e2aab82a573ff121a086b224c.tar.bz2
samba-b35f21fb3a19417e2aab82a573ff121a086b224c.zip
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)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c16
1 files changed, 15 insertions, 1 deletions
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},
@@ -2373,6 +2374,19 @@ static BOOL handle_winbind_id(char *pszParmValue, char **ptr)
}
/***************************************************************************
+ 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
***************************************************************************/
static void init_copymap(service * pservice)