1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-23 06:50:21 +03:00

param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()

Jermey started this in 1997 with 0aa493cc0303aa4177f289b9e4c797c8fa180672

(avoiding the duplicate function makes it easier to generate the
struct loadparm_globals).

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2011-07-01 15:14:08 +10:00
parent 6d8cc418ba
commit d4ef70a764
12 changed files with 14 additions and 16 deletions

View File

@ -1294,7 +1294,6 @@ bool lp_reset_on_zero_vc(void);
bool lp_log_writeable_files_on_exit(void);
bool lp_ms_add_printer_wizard(void);
bool lp_dns_proxy(void);
bool lp_wins_support(void);
bool lp_we_are_a_wins_server(void);
bool lp_wins_proxy(void);
bool lp_local_master(void);

View File

@ -153,7 +153,7 @@ unsigned wins_srv_count(void)
const char **list;
int count = 0;
if (lp_wins_support()) {
if (lp_we_are_a_wins_server()) {
/* simple - just talk to ourselves */
return 1;
}
@ -210,7 +210,7 @@ char **wins_srv_tags(void)
int count=0, i, j;
const char **list;
if (lp_wins_support()) {
if (lp_we_are_a_wins_server()) {
/* give the caller something to chew on. This makes
the rest of the logic simpler (ie. less special cases) */
ret = SMB_MALLOC_ARRAY(char *, 2);
@ -283,7 +283,7 @@ struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip)
struct tagged_ip t_ip;
/* if we are a wins server then we always just talk to ourselves */
if (lp_wins_support()) {
if (lp_we_are_a_wins_server()) {
struct in_addr loopback_ip;
loopback_ip.s_addr = htonl(INADDR_LOOPBACK);
return loopback_ip;
@ -381,7 +381,7 @@ unsigned wins_srv_count_tag(const char *tag)
int i, count=0;
/* if we are a wins server then we always just talk to ourselves */
if (lp_wins_support()) {
if (lp_we_are_a_wins_server()) {
return 1;
}

View File

@ -33,7 +33,7 @@ uint16 samba_nb_type = 0; /* samba's NetBIOS name type */
void set_samba_nb_type(void)
{
if( lp_wins_support() || wins_srv_count() ) {
if( lp_we_are_a_wins_server() || wins_srv_count() ) {
samba_nb_type = NB_HFLAG; /* samba is a 'hybrid' node type. */
} else {
samba_nb_type = NB_BFLAG; /* samba is broadcast-only node type. */

View File

@ -5652,7 +5652,6 @@ FN_GLOBAL_BOOL(lp_log_writeable_files_on_exit,
bLogWriteableFilesOnExit)
FN_GLOBAL_BOOL(lp_ms_add_printer_wizard, bMsAddPrinterWizard)
FN_GLOBAL_BOOL(lp_dns_proxy, bDNSproxy)
FN_GLOBAL_BOOL(lp_wins_support, bWINSsupport)
FN_GLOBAL_BOOL(lp_we_are_a_wins_server, bWINSsupport)
FN_GLOBAL_BOOL(lp_wins_proxy, bWINSproxy)
FN_GLOBAL_BOOL(lp_local_master, bLocalMaster)

View File

@ -716,7 +716,7 @@ static WERROR fill_svc_config(TALLOC_CTX *mem_ctx,
if ( strequal( name, "NETLOGON" ) && ( lp_servicenumber(name) == -1 ) )
config->start_type = SVCCTL_DISABLED;
else if ( strequal( name, "WINS" ) && ( !lp_wins_support() ))
else if ( strequal( name, "WINS" ) && ( !lp_we_are_a_wins_server() ))
config->start_type = SVCCTL_DISABLED;
else
config->start_type = SVCCTL_DEMAND_START;

View File

@ -32,7 +32,7 @@ static WERROR wins_status( const char *service, struct SERVICE_STATUS *service_s
service_status->type = SERVICE_TYPE_WIN32_OWN_PROCESS;
service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
if ( lp_wins_support() )
if ( lp_we_are_a_wins_server() )
service_status->state = SVCCTL_RUNNING;
else {
service_status->state = SVCCTL_STOPPED;

View File

@ -72,7 +72,7 @@ static int do_global_checks(void)
ret = 1;
}
if (lp_wins_support() && lp_wins_server_list()) {
if (lp_we_are_a_wins_server() && lp_wins_server_list()) {
fprintf(stderr, "ERROR: both 'wins support = true' and 'wins server = <server list>' \
cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
ret = 1;

View File

@ -775,7 +775,7 @@ static void wizard_page(void)
else
{
/* Now determine smb.conf WINS settings */
if (lp_wins_support())
if (lp_we_are_a_wins_server())
winstype = 1;
if (lp_wins_server_list() && strlen(*lp_wins_server_list()))
winstype = 2;
@ -783,7 +783,7 @@ static void wizard_page(void)
/* Do we have a homes share? */
have_home = lp_servicenumber(HOMES_NAME);
}
if ((winstype == 2) && lp_wins_support())
if ((winstype == 2) && lp_we_are_a_wins_server())
winstype = 3;
role = lp_server_role();

View File

@ -82,7 +82,7 @@ void nbtd_request_query(struct nbt_name_socket *nbtsock,
if (!(packet->operation & NBT_FLAG_BROADCAST) &&
(packet->operation & NBT_FLAG_RECURSION_DESIRED) &&
(iname->nb_flags & NBT_NM_GROUP) &&
lpcfg_wins_support(iface->nbtsrv->task->lp_ctx)) {
lpcfg_we_are_a_wins_server(iface->nbtsrv->task->lp_ctx)) {
nbtd_winsserver_request(nbtsock, packet, src);
return;
}

View File

@ -1038,7 +1038,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
uint32_t tmp;
const char *owner;
if (!lpcfg_wins_support(nbtsrv->task->lp_ctx)) {
if (!lpcfg_we_are_a_wins_server(nbtsrv->task->lp_ctx)) {
nbtsrv->winssrv = NULL;
return NT_STATUS_OK;
}

View File

@ -1515,7 +1515,7 @@ FN_GLOBAL_LIST(interfaces, szInterfaces)
FN_GLOBAL_STRING(socket_address, szSocketAddress)
FN_GLOBAL_LIST(netbios_aliases, szNetbiosAliases)
FN_GLOBAL_BOOL(disable_netbios, bDisableNetbios)
FN_GLOBAL_BOOL(wins_support, bWINSsupport)
FN_GLOBAL_BOOL(we_are_a_wins_server, bWINSsupport)
FN_GLOBAL_BOOL(wins_dns_proxy, bWINSdnsProxy)
FN_GLOBAL_STRING(wins_hook, szWINSHook)
FN_GLOBAL_BOOL(local_master, bLocalMaster)

View File

@ -451,7 +451,7 @@ static void wreplsrv_task_init(struct task_server *task)
NTSTATUS status;
struct wreplsrv_service *service;
if (!lpcfg_wins_support(task->lp_ctx)) {
if (!lpcfg_we_are_a_wins_server(task->lp_ctx)) {
return;
}