summaryrefslogtreecommitdiff
path: root/source3/nameannounce.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/nameannounce.c
parent21cdd72c33960c4da3607b488e984631487197e1 (diff)
downloadsamba-8781e4d787763a6b50d7b3819b33ace208ff7784.tar.gz
samba-8781e4d787763a6b50d7b3819b33ace208ff7784.tar.bz2
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/nameannounce.c')
-rw-r--r--source3/nameannounce.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/nameannounce.c b/source3/nameannounce.c
index fec8895510..1dadc0132c 100644
--- a/source3/nameannounce.c
+++ b/source3/nameannounce.c
@@ -292,9 +292,8 @@ void announce_server(struct subnet_record *d, struct work_record *work,
/****************************************************************************
construct a host announcement unicast
**************************************************************************/
-void announce_host(void)
+void announce_host(time_t t)
{
- time_t t = time(NULL);
struct subnet_record *d;
pstring comment;
char *my_name;
@@ -368,11 +367,10 @@ void announce_host(void)
NAME_QUERY_DOM_SRV_CHK command, if there is a response from the
name query initiated here. see response_name_query()
**************************************************************************/
-void announce_master(void)
+void announce_master(time_t t)
{
struct subnet_record *d;
static time_t last=0;
- time_t t = time(NULL);
BOOL am_master = False; /* are we a master of some sort? :-) */
if (!last) last = t;
@@ -477,11 +475,10 @@ void announce_master(void)
on a remote browse list. They are done blind, no checking is done to
see if there is actually a browse master at the other end.
**************************************************************************/
-void announce_remote(void)
+void announce_remote(time_t t)
{
char *s,*ptr;
static time_t last_time = 0;
- time_t t = time(NULL);
pstring s2;
struct in_addr addr;
char *comment,*workgroup;