summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_mynames.c2
-rw-r--r--source3/nmbd/nmbd_namelistdb.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c
index ba42274165..4a4e102786 100644
--- a/source3/nmbd/nmbd_mynames.c
+++ b/source3/nmbd/nmbd_mynames.c
@@ -197,7 +197,7 @@ void refresh_my_names(time_t t)
if( !is_refresh_already_queued( subrec, namerec) )
refresh_name( subrec, namerec, NULL, NULL, NULL );
namerec->data.death_time += lp_max_ttl();
- namerec->data.refresh_time += lp_max_ttl();
+ namerec->data.refresh_time += MIN(lp_max_ttl(), MAX_REFRESH_TIME);
}
}
}
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index de5835a115..498cbcfdcf 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -186,7 +186,7 @@ void update_name_ttl( struct name_record *namerec, int ttl )
if( namerec->data.death_time != PERMANENT_TTL )
namerec->data.death_time = time_now + ttl;
- namerec->data.refresh_time = time_now + (ttl/2);
+ namerec->data.refresh_time = time_now + MIN((ttl/2), MAX_REFRESH_TIME);
namerec->subnet->namelist_changed = True;
} /* update_name_ttl */
@@ -251,7 +251,7 @@ struct name_record *add_name_to_subnet( struct subnet_record *subrec,
else
namerec->data.death_time = time_now + ttl;
- namerec->data.refresh_time = time_now + (ttl/2);
+ namerec->data.refresh_time = time_now + MIN((ttl/2), MAX_REFRESH_TIME);
/* Now add the record to the name list. */
update_name_in_namelist( subrec, namerec );