summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_mynames.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
commit250c9801197ea1c949bd94c1c891f81ab118b130 (patch)
tree3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/nmbd/nmbd_mynames.c
parent477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff)
downloadsamba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz
samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2
samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/nmbd/nmbd_mynames.c')
-rw-r--r--source3/nmbd/nmbd_mynames.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c
index ba7d509a77..dd66821839 100644
--- a/source3/nmbd/nmbd_mynames.c
+++ b/source3/nmbd/nmbd_mynames.c
@@ -23,9 +23,6 @@
#include "includes.h"
-extern char **my_netbios_names;
-extern fstring global_myworkgroup;
-
extern uint16 samba_nb_type; /* Samba's NetBIOS type. */
/****************************************************************************
@@ -51,10 +48,10 @@ void register_my_workgroup_one_subnet(struct subnet_record *subrec)
struct work_record *work;
/* Create the workgroup on the subnet. */
- if((work = create_workgroup_on_subnet(subrec, global_myworkgroup,
+ if((work = create_workgroup_on_subnet(subrec, lp_workgroup(),
PERMANENT_TTL)) == NULL) {
DEBUG(0,("register_my_workgroup_and_names: Failed to create my workgroup %s on subnet %s. \
-Exiting.\n", global_myworkgroup, subrec->subnet_name));
+Exiting.\n", lp_workgroup(), subrec->subnet_name));
return;
}
@@ -63,14 +60,14 @@ Exiting.\n", global_myworkgroup, subrec->subnet_name));
add_samba_names_to_subnet(subrec);
/* Register all our names including aliases. */
- for (i=0; my_netbios_names[i]; i++) {
- register_name(subrec, my_netbios_names[i],0x20,samba_nb_type,
+ for (i=0; my_netbios_names(i); i++) {
+ register_name(subrec, my_netbios_names(i),0x20,samba_nb_type,
NULL,
my_name_register_failed, NULL);
- register_name(subrec, my_netbios_names[i],0x03,samba_nb_type,
+ register_name(subrec, my_netbios_names(i),0x03,samba_nb_type,
NULL,
my_name_register_failed, NULL);
- register_name(subrec, my_netbios_names[i],0x00,samba_nb_type,
+ register_name(subrec, my_netbios_names(i),0x00,samba_nb_type,
NULL,
my_name_register_failed, NULL);
}
@@ -133,7 +130,7 @@ BOOL register_my_workgroup_and_names(void)
add_samba_names_to_subnet(unicast_subnet);
- for (i=0; my_netbios_names[i]; i++)
+ for (i=0; my_netbios_names(i); i++)
{
for(subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec))
{
@@ -142,13 +139,13 @@ BOOL register_my_workgroup_and_names(void)
*/
struct nmb_name nmbname;
- make_nmb_name(&nmbname, my_netbios_names[i],0x20);
+ make_nmb_name(&nmbname, my_netbios_names(i),0x20);
insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
- make_nmb_name(&nmbname, my_netbios_names[i],0x3);
+ make_nmb_name(&nmbname, my_netbios_names(i),0x3);
insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
- make_nmb_name(&nmbname, my_netbios_names[i],0x0);
+ make_nmb_name(&nmbname, my_netbios_names(i),0x0);
insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
}
}
@@ -165,10 +162,10 @@ BOOL register_my_workgroup_and_names(void)
*/
struct nmb_name nmbname;
- make_nmb_name(&nmbname, global_myworkgroup, 0x0);
+ make_nmb_name(&nmbname, lp_workgroup(), 0x0);
insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
- make_nmb_name(&nmbname, global_myworkgroup, 0x1e);
+ make_nmb_name(&nmbname, lp_workgroup(), 0x1e);
insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
}