diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-06-08 04:34:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-06-08 04:34:45 +0000 |
commit | f78081fd1fb4f5739264e23cf75c3e5b1c2eebf1 (patch) | |
tree | 73b0c95b32ec26540b838f8d3018720d74ac629b /source3/nameannounce.c | |
parent | 4eba893b02334953b0f1bc082dcba6f930f9ff80 (diff) | |
download | samba-f78081fd1fb4f5739264e23cf75c3e5b1c2eebf1.tar.gz samba-f78081fd1fb4f5739264e23cf75c3e5b1c2eebf1.tar.xz samba-f78081fd1fb4f5739264e23cf75c3e5b1c2eebf1.zip |
patches fromk Luke putting in symbolic names for time constants
(This used to be commit 79849b829314e5caf4f0f5b95e4a8a0c2c223f90)
Diffstat (limited to 'source3/nameannounce.c')
-rw-r--r-- | source3/nameannounce.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/nameannounce.c b/source3/nameannounce.c index 197548088bb..35247b4d0b6 100644 --- a/source3/nameannounce.c +++ b/source3/nameannounce.c @@ -51,7 +51,6 @@ extern int workgroup_count; /* what server type are we currently */ -#define MSBROWSE "\001\002__MSBROWSE__\002" #define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE" /**************************************************************************** @@ -124,7 +123,7 @@ void announce_backup(void) int tok; if (!lastrun) lastrun = t; - if (t < lastrun + 1*60) return; + if (t < lastrun + CHECK_TIME_ANNOUNCE_BACKUP * 60) return; lastrun = t; for (tok = 0; tok <= workgroup_count; tok++) @@ -215,7 +214,8 @@ void announce_host(void) if (work->needannounce) { /* drop back to a max 3 minute announce - this is to prevent a single lost packet from stuffing things up for too long */ - work->announce_interval = MIN(work->announce_interval,3*60); + work->announce_interval = MIN(work->announce_interval, + CHECK_TIME_MIN_HOST_ANNCE*60); work->lastannounce_time = t - (work->announce_interval+1); } @@ -224,7 +224,7 @@ void announce_host(void) (t - work->lastannounce_time) < work->announce_interval) continue; - if (work->announce_interval < 12*60) + if (work->announce_interval < CHECK_TIME_MAX_HOST_ANNCE * 60) work->announce_interval += 60; work->lastannounce_time = t; @@ -343,11 +343,8 @@ void announce_master(void) time_t t = time(NULL); BOOL am_master = False; /* are we a master of some sort? :-) */ -#ifdef TEST_CODE - if (last && (t-last < 2*60)) return; -#else - if (last && (t-last < 15*60)) return; -#endif + if (last && (t-last < CHECK_TIME_MST_ANNOUNCE * 60)) + return; last = t; @@ -425,7 +422,7 @@ void announce_master(void) ip = *interpret_addr2(lp_domain_controller()); if (zero_ip(ip)) { - ip = *iface_bcast(d->bcast_ip); + ip = d->bcast_ip; bcast = True; } |