diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-06-04 15:14:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-06-04 15:14:47 +0000 |
commit | a2641cfe00b7857056fd8fd1e020aae7ea817690 (patch) | |
tree | 39bcd37ec9240fb1a285a50fb12303cb2a865363 /source3/nmbd/nmbd.c | |
parent | 5607ff396c375976e440f9c955a313ddd58e3bbd (diff) | |
download | samba-a2641cfe00b7857056fd8fd1e020aae7ea817690.tar.gz samba-a2641cfe00b7857056fd8fd1e020aae7ea817690.tar.bz2 samba-a2641cfe00b7857056fd8fd1e020aae7ea817690.zip |
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)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r-- | source3/nmbd/nmbd.c | 22 |
1 files changed, 12 insertions, 10 deletions
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(); |