summaryrefslogtreecommitdiff
path: root/source3/nameserv.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/nameserv.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/nameserv.c')
-rw-r--r--source3/nameserv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/nameserv.c b/source3/nameserv.c
index c8bbb52811..7353251940 100644
--- a/source3/nameserv.c
+++ b/source3/nameserv.c
@@ -240,7 +240,7 @@ void refresh_my_names(time_t t)
for (n = d->namelist; n; n = n->next)
{
/* each SELF name has an individual time to be refreshed */
- if (n->source == SELF && n->refresh_time < time(NULL) &&
+ if (n->source == SELF && n->refresh_time < t &&
n->death_time != 0)
{
add_my_name_entry(d,n->name.name,n->name.name_type,
@@ -263,13 +263,12 @@ void refresh_my_names(time_t t)
XXXX which names to poll and which not can be refined at a later date.
******************************************************************/
-void query_refresh_names(void)
+void query_refresh_names(time_t t)
{
struct name_record *n;
struct subnet_record *d = find_subnet(ipgrp);
static time_t lasttime = 0;
- time_t t = time(NULL);
int count = 0;
int name_refresh_time = NAME_POLL_REFRESH_TIME;