summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_mynames.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-31 04:19:31 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-31 04:19:31 +0000
commit055e3c88e6d88bd7dee5ae9c87dc04433124f660 (patch)
tree8926b49f52fc52644a5e98318f71e0b51f6dc4a4 /source3/nmbd/nmbd_mynames.c
parentcc022132a6dd937eff330612ebaaefe23bff8a6c (diff)
downloadsamba-055e3c88e6d88bd7dee5ae9c87dc04433124f660.tar.gz
samba-055e3c88e6d88bd7dee5ae9c87dc04433124f660.tar.bz2
samba-055e3c88e6d88bd7dee5ae9c87dc04433124f660.zip
set a maximum name refresh time of 20 minutes.
The previous code was strictly correct, but not very practical. self names were only refreshed every 3 days. I hit a situation where the Samba WINS server was restarted after deleting wins.dat and didn't notice some remote subnets (also running Samba). I realised that the complete database wouldn't have been rebuilt for 3 days, which is way too long. In order to recover from WINS restarts we need a much shorter maximum refresh time. (This used to be commit 1d23dd0912e81ff72695bd043e8e2aee32da18a8)
Diffstat (limited to 'source3/nmbd/nmbd_mynames.c')
-rw-r--r--source3/nmbd/nmbd_mynames.c2
1 files changed, 1 insertions, 1 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);
}
}
}