svn commit: samba r12701 - in
branches/SAMBA_4_0/source/wrepl_server: .
metze at samba.org
metze at samba.org
Tue Jan 3 20:07:35 GMT 2006
Author: metze
Date: 2006-01-03 20:07:34 +0000 (Tue, 03 Jan 2006)
New Revision: 12701
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12701
Log:
the first scavenging run should happen after half of the renew_interval,
and not on startup
metze
Modified:
branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c
Changeset:
Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c 2006-01-03 20:03:51 UTC (rev 12700)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c 2006-01-03 20:07:34 UTC (rev 12701)
@@ -360,15 +360,28 @@
{
NTSTATUS status;
TALLOC_CTX *tmp_mem;
+ BOOL skip_first_run = False;
if (!timeval_expired(&service->scavenging.next_run)) {
return NT_STATUS_OK;
}
+ if (timeval_is_zero(&service->scavenging.next_run)) {
+ skip_first_run = True;
+ }
+
service->scavenging.next_run = timeval_current_ofs(service->config.scavenging_interval, 0);
status = wreplsrv_periodic_schedule(service, service->config.scavenging_interval);
NT_STATUS_NOT_OK_RETURN(status);
+ /*
+ * if it's the first time this functions is called (startup)
+ * the next_run is zero, in this case we should not do scavenging
+ */
+ if (skip_first_run) {
+ return NT_STATUS_OK;
+ }
+
if (service->scavenging.processing) {
return NT_STATUS_OK;
}
More information about the samba-cvs
mailing list