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 | 045014aa57721b9701ca379bcab055b908773184 (patch) | |
tree | 3728ee54adc0c956ae3762f260958b16f9fb370e /source/nmbd | |
parent | bc4a2994377ab078d3d1a900f79fda9dfe4d0e6a (diff) | |
download | samba-045014aa57721b9701ca379bcab055b908773184.tar.gz |
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.
Diffstat (limited to 'source/nmbd')
-rw-r--r-- | source/nmbd/nmbd.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 222ab3f921c..b6ef717cc0a 100644 --- a/source/nmbd/nmbd.c +++ b/source/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(); |