s4-repl: refresh the partitions on each cycle
authorAndrew Tridgell <tridge@samba.org>
Fri, 11 Sep 2009 12:47:11 +0000 (22:47 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 11 Sep 2009 12:47:11 +0000 (22:47 +1000)
The KCC might have changed repsFrom, which is stored in the partitions
structure

source4/dsdb/repl/drepl_partitions.c
source4/dsdb/repl/drepl_periodic.c

index f36b735d325da37fe4a589a53827c6be2fb1c2c3..88c4bbf0652545573a5a7644052755dec034d477 100644 (file)
@@ -33,8 +33,6 @@
 #include "librpc/gen_ndr/ndr_drsblobs.h"
 #include "param/param.h"
 
-static WERROR dreplsrv_refresh_partitions(struct dreplsrv_service *s);
-
 WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
 {
        WERROR status;
@@ -256,7 +254,7 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
        return WERR_OK;
 }
 
-static WERROR dreplsrv_refresh_partitions(struct dreplsrv_service *s)
+WERROR dreplsrv_refresh_partitions(struct dreplsrv_service *s)
 {
        WERROR status;
        struct dreplsrv_partition *p;
index b88d2cee1ee72c42e61c41ca5182ee8fae1a07c9..36d5f924be5ac07e51f806add97d46ed190a7440 100644 (file)
@@ -105,5 +105,8 @@ static void dreplsrv_periodic_run(struct dreplsrv_service *service)
 
        DEBUG(2,("dreplsrv_periodic_run(): run pending_ops\n"));
 
+       /* the KCC might have changed repsFrom */
+       dreplsrv_refresh_partitions(service);
+
        dreplsrv_run_pending_ops(service);
 }