From 0777ebc04b838b6b9036a5d0a6e0565bb0a65d9f Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Sun, 26 Aug 2001 06:24:03 +0000 Subject: [PATCH] Instead of checking lp_wins_server() to see if a WINS server was specified, nmbd now calls wins_srv_count(). This returns the number of WINS servers specified in the 'wins server' parameter. The return value will be zero if 'wins server' is not specified. Quick change to make room for WINS failover. --- source/nmbd/nmbd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 7795958ed08..87c539371be 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -298,12 +298,15 @@ static BOOL reload_nmbd_services(BOOL test) } /* Do a sanity check for a misconfigured nmbd */ - if( lp_wins_support() && *lp_wins_server() ) - { - DEBUG(0,("ERROR: both 'wins support = true' and 'wins server = ' \ -cannot be set in the smb.conf file. nmbd aborting.\n")); + if( lp_wins_support() && wins_srv_count() ) + { + if( DEBUGLVL(0) ) + { + dbgtext( "ERROR: 'wins support = true' and 'wins server = '\n" ); + dbgtext( "are conflicting settings. nmbd aborting.\n" ); + } exit(10); - } + } return(ret); } /* reload_nmbd_services */ -- 2.47.3