From a2641cfe00b7857056fd8fd1e020aae7ea817690 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Jun 1996 15:14:47 +0000 Subject: Did more integration of Lukes code ready for the first release. I've now got WINS registration working, and refresh working. Its looking pretty good so far, but needs lots of testing. (This used to be commit 045014aa57721b9701ca379bcab055b908773184) --- source3/nmbd/nmbd.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'source3/nmbd') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 222ab3f921..b6ef717cc0 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -144,15 +144,15 @@ static void fault_continue(void) ******************************************************************/ static void expire_names_and_servers(void) { - static time_t lastrun = 0; - time_t t = time(NULL); - - if (!lastrun) lastrun = t; - if (t < lastrun + 5) return; - lastrun = t; - - expire_names(t); - expire_servers(t); + static time_t lastrun = 0; + time_t t = time(NULL); + + if (!lastrun) lastrun = t; + if (t < lastrun + 5) return; + lastrun = t; + + expire_names(t); + expire_servers(t); } /***************************************************************************** @@ -285,6 +285,7 @@ static void process(void) while (True) { + time_t t = time(NULL); run_election = check_elections(); listen_for_packets(run_election); @@ -296,7 +297,8 @@ static void process(void) announce_master(); expire_names_and_servers(); - expire_netbios_response_entries(time(NULL)-10); + expire_netbios_response_entries(t-10); + refresh_my_names(t); write_browse_list(); do_browser_lists(); -- cgit