From f082328f4536b95a93d86f7201913f65e7ed743b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 19 Sep 2001 09:09:51 +0000 Subject: [PATCH] logs changes even if no appropriate replica (or none at all) is defined (ITS#1335) --- servers/slapd/repl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index e5eddcfb8b..7b0b9a3f99 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -58,7 +58,11 @@ replog( struct replog_moddn *moddn; char *tmp; FILE *fp, *lfp; - int len, i, count = 0; + int len, i; +/* undef NO_LOG_WHEN_NO_REPLICAS */ +#ifdef NO_LOG_WHEN_NO_REPLICAS + int count = 0; +#endif if ( be->be_replogfile == NULL && replogfile == NULL ) { return; @@ -100,10 +104,13 @@ replog( } fprintf( fp, "replica: %s\n", be->be_replica[i]->ri_host ); +#ifdef NO_LOG_WHEN_NO_REPLICAS ++count; +#endif } ch_free( tmp ); +#ifdef NO_LOG_WHEN_NO_REPLICAS if ( count == 0 ) { /* if no replicas matched, drop the log * (should we log it anyway?) */ @@ -112,6 +119,7 @@ replog( return; } +#endif fprintf( fp, "time: %ld\n", (long) slap_get_time() ); fprintf( fp, "dn: %s\n", dn ); -- 2.39.5