summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-09-12 06:13:25 +0000
committerAndrew Tridgell <tridge@samba.org>2000-09-12 06:13:25 +0000
commitf0ce4f7ae3b58f45b70598e3a44539e3e12291ce (patch)
tree35c9fea99d0325807f7044bf176047aa420cd17c /source3/nmbd/nmbd.c
parenta19836ae5267fa967482f2baacd5e8cf8767bf79 (diff)
downloadsamba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.tar.gz
samba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.tar.bz2
samba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.zip
- changed the msg_type to be an int instead of an enum so that it is
easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election (This used to be commit f1c49ca7ce56bc39259041a71479e84ebf53eeca)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 2da879fc94..914f288001 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -312,6 +312,9 @@ static void process(void)
{
time_t t = time(NULL);
+ /* check for internal messages */
+ message_dispatch();
+
/*
* Check all broadcast subnets to see if
* we need to run an election on any of them.
@@ -490,9 +493,6 @@ static void process(void)
/* free up temp memory */
lp_talloc_free();
-
- /* check for internal messages */
- message_init();
}
} /* process */
@@ -795,6 +795,7 @@ static void usage(char *pname)
pidfile_create("nmbd");
message_init();
+ message_register(MSG_FORCE_ELECTION, nmbd_message_election);
DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) );