]> git.sur5r.net Git - openldap/commitdiff
backport ITS#1335
authorPierangelo Masarati <ando@openldap.org>
Fri, 26 Apr 2002 08:57:37 +0000 (08:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 26 Apr 2002 08:57:37 +0000 (08:57 +0000)
CHANGES
servers/slapd/repl.c

diff --git a/CHANGES b/CHANGES
index e6beb1df3be74af711d344575816cea75192677f..2458f5302f77608692f67627837432a780ce4f12 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@ OpenLDAP 2.0.24 Engineering
        Fixed ber_bvstrdup() empty string ("") bug (ITS#1662)
        Fixed back-ldbm dn normalization bug in onelevel searches (ITS#1654)
        Fixed back-ldbm modrdn root dn check (ITS#1761)
+       Fixed replog logging without replica (ITS#1335)
        Documentation
                Updated release documents
 
index 6c30c766e1dbcd908f3d4ed9f11256e50984f280..cb0f343196e7d0bbcc3d6fde942d36493cb43717 100644 (file)
@@ -83,7 +83,7 @@ replog(
        struct replog_moddn *moddn;
        char *tmp;
        FILE    *fp, *lfp;
-       int     len, i, count = 0;
+       int     len, i;
 
        if ( be->be_replogfile == NULL && replogfile == NULL ) {
                return;
@@ -125,19 +125,9 @@ replog(
                }
 
                fprintf( fp, "replica: %s\n", be->be_replica[i]->ri_host );
-               ++count;
        }
 
        ch_free( tmp );
-       if ( count == 0 ) {
-               /* if no replicas matched, drop the log 
-                * (should we log it anyway?) */
-               lock_fclose( fp, lfp );
-               ldap_pvt_thread_mutex_unlock( &replog_mutex );
-
-               return;
-       }
-
        fprintf( fp, "time: %ld\n", (long) slap_get_time() );
        fprintf( fp, "dn: %s\n", dn );