summaryrefslogtreecommitdiffstats
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 550f3198f7..11f005b785 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -40,6 +40,7 @@ int ClientDGRAM = -1;
extern pstring myhostname;
static pstring host_file;
extern pstring myname;
+extern fstring myworkgroup;
/* are we running as a daemon ? */
static BOOL is_daemon = False;
@@ -67,7 +68,7 @@ static int sig_term()
/* announce all server entries as 0 time-to-live, 0 type */
/* XXXX don't care if we never receive a response back... yet */
- remove_my_servers();
+ announce_my_servers_removed();
/* XXXX other things: if we are a master browser, force an election? */
@@ -203,9 +204,6 @@ BOOL reload_services(BOOL test)
reload_services(True);
}
- load_interfaces();
- add_subnet_interfaces();
-
/* 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 = <server>' \
@@ -502,6 +500,8 @@ static void usage(char *pname)
reload_services(True);
+ strcpy(myworkgroup, lp_workgroup());
+
set_samba_nb_type();
if (!is_daemon && !is_a_socket(0)) {
@@ -549,15 +549,16 @@ static void usage(char *pname)
DEBUG(3,("Loaded hosts file\n"));
}
+ load_interfaces();
+ add_my_subnets(myworkgroup);
+
add_my_names();
- if (strequal(lp_workgroup(),"*")) {
+ if (strequal(myworkgroup,"*")) {
DEBUG(0,("ERROR: a workgroup name of * is no longer supported\n"));
exit(1);
}
- add_my_subnets(lp_workgroup());
-
DEBUG(3,("Checked names\n"));
load_netbios_names();