X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=blobdiff_plain;f=source4%2Fwrepl_server%2Fwrepl_periodic.c;h=4771544428e319f10bdb57872c9bef65ebdbfceb;hp=a541d614e6980acc70fae694d3c5c8ec617773bd;hb=6bcd2cbd27cc62e5cfc5a4707b7a991ab691f3c8;hpb=d4de4c2d210d2e8c9b5aedf70695594809ad6a0b diff --git a/source4/wrepl_server/wrepl_periodic.c b/source4/wrepl_server/wrepl_periodic.c index a541d614e69..4771544428e 100644 --- a/source4/wrepl_server/wrepl_periodic.c +++ b/source4/wrepl_server/wrepl_periodic.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,20 +16,23 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" #include "lib/events/events.h" #include "smbd/service_task.h" -#include "librpc/gen_ndr/ndr_winsrepl.h" +#include "smbd/service.h" +#include "librpc/gen_ndr/winsrepl.h" #include "wrepl_server/wrepl_server.h" static NTSTATUS wreplsrv_periodic_run(struct wreplsrv_service *service) { NTSTATUS status; + status = wreplsrv_load_partners(service); + NT_STATUS_NOT_OK_RETURN(status); + status = wreplsrv_scavenging_run(service); NT_STATUS_NOT_OK_RETURN(status); @@ -42,7 +45,7 @@ static NTSTATUS wreplsrv_periodic_run(struct wreplsrv_service *service) return NT_STATUS_OK; } -static void wreplsrv_periodic_handler_te(struct event_context *ev, struct timed_event *te, +static void wreplsrv_periodic_handler_te(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *ptr) { struct wreplsrv_service *service = talloc_get_type(ptr, struct wreplsrv_service); @@ -65,7 +68,7 @@ static void wreplsrv_periodic_handler_te(struct event_context *ev, struct timed_ NTSTATUS wreplsrv_periodic_schedule(struct wreplsrv_service *service, uint32_t next_interval) { TALLOC_CTX *tmp_mem; - struct timed_event *new_te; + struct tevent_timer *new_te; struct timeval next_time; /* prevent looping */ @@ -92,7 +95,7 @@ NTSTATUS wreplsrv_periodic_schedule(struct wreplsrv_service *service, uint32_t n NT_STATUS_HAVE_NO_MEMORY(new_te); tmp_mem = talloc_new(service); - DEBUG(4,("wreplsrv_periodic_schedule(%u) %sscheduled for: %s\n", + DEBUG(6,("wreplsrv_periodic_schedule(%u) %sscheduled for: %s\n", next_interval, (service->periodic.te?"re":""), nt_time_string(tmp_mem, timeval_to_nttime(&next_time))));