summaryrefslogtreecommitdiffstats
path: root/source3/nameelect.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-10-07 01:56:21 +0000
committerAndrew Tridgell <tridge@samba.org>1996-10-07 01:56:21 +0000
commit8781e4d787763a6b50d7b3819b33ace208ff7784 (patch)
treee9266e994f66c9ee0de0544d63359aa2ffb09a1a /source3/nameelect.c
parent21cdd72c33960c4da3607b488e984631487197e1 (diff)
downloadsamba-8781e4d787763a6b50d7b3819b33ace208ff7784.tar.gz
samba-8781e4d787763a6b50d7b3819b33ace208ff7784.tar.xz
samba-8781e4d787763a6b50d7b3819b33ace208ff7784.zip
- changed the default nmbd loop timout to 10 seconds (2 seconds was much
too short) - got rid of many unnecessary calls to time(NULL) in nmbd. They were causing it to chew too much CPU time when idle. Now we pass a time value in from the top level. (This used to be commit 3cd7303dbc2118db7084a6d8872403d825c52323)
Diffstat (limited to 'source3/nameelect.c')
-rw-r--r--source3/nameelect.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/nameelect.c b/source3/nameelect.c
index be8a405daac..1c4f8e63900 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -54,10 +54,9 @@ extern uint16 nb_type; /* samba's NetBIOS name type */
/*******************************************************************
occasionally check to see if the master browser is around
******************************************************************/
-void check_master_browser(void)
+void check_master_browser(time_t t)
{
static time_t lastrun=0;
- time_t t = time(NULL);
struct subnet_record *d;
if (!lastrun) lastrun = t;
@@ -474,9 +473,8 @@ void become_nonmaster(struct subnet_record *d, struct work_record *work,
/*******************************************************************
run the election
******************************************************************/
-void run_elections(void)
+void run_elections(time_t t)
{
- time_t t = time(NULL);
static time_t lastime = 0;
struct subnet_record *d;