]> git.sur5r.net Git - openldap/commitdiff
Fixed slapd extended match memory leak (ITS#3146)
authorKurt Zeilenga <kurt@openldap.org>
Sat, 22 May 2004 00:46:00 +0000 (00:46 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 22 May 2004 00:46:00 +0000 (00:46 +0000)
CHANGES
doc/man/man5/slapd.conf.5
servers/slapd/config.c

diff --git a/CHANGES b/CHANGES
index 68c5ca20f809b662108d9b8494ae5279e734c506..3afd71dd89d19d51734b18553d6431fcd4059182 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ OpenLDAP 2.2.12 Engineering
        Fixed slapd set acl recursion (ITS#3140)
        Fixed slapd entry2mods normalization bug (ITS#3144,3152)
        Fixed slapd extended match memory leak (ITS#3146)
+       Fixed slapd syncrepl persist interval issue (ITS#3064)
        Fixed back-ldap normalization bug 
        Fixed pcache cache_entries init bug (ITS#3150)
        Fixed pcache consistency_check bug (ITS#3151)
index 380bb9999fa25091186fed41bc7bcae262e592e4..16decea045110f98843d5140b72e186cc56e0802 100644 (file)
@@ -1377,7 +1377,11 @@ operation, a synchronization search remains persistent in the provider slapd.
 Further updates to the master replica will generate
 .B searchResultEntry
 to the consumer slapd as the search responses to the persistent
-synchronization search. The schema checking can be enforced at the LDAP Sync
+synchronization search. If the connection is lost, the consumer will
+attempt to reconnect at an interval time (specified by
+.B interval
+parameter; 60 seconds by default) until the session is re-established.
+The schema checking can be enforced at the LDAP Sync
 consumer site by turning on the
 .B schemachecking
 parameter. The default is off.
index ae65665ce267bb96b11a14b3b26179856dcf5f86..df929414f4b125c73aefbc262c212c58ec75c54c 100644 (file)
@@ -3173,51 +3173,48 @@ parse_syncrepl_line(
                } else if ( !strncasecmp( cargv[ i ],
                        INTERVALSTR, sizeof( INTERVALSTR ) - 1 ) )
                {
+                       char *hstr;
+                       char *mstr;
+                       char *dstr;
+                       char *sstr;
+                       int dd, hh, mm, ss;
                        val = cargv[ i ] + sizeof( INTERVALSTR );
-                       if ( si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
-                               si->si_interval = 0;
-                       } else {
-                               char *hstr;
-                               char *mstr;
-                               char *dstr;
-                               char *sstr;
-                               int dd, hh, mm, ss;
-                               dstr = val;
-                               hstr = strchr( dstr, ':' );
-                               if ( hstr == NULL ) {
-                                       fprintf( stderr, "Error: parse_syncrepl_line: "
-                                               "invalid interval \"%s\"\n", val );
-                                       return 1;
-                               }
-                               *hstr++ = '\0';
-                               mstr = strchr( hstr, ':' );
-                               if ( mstr == NULL ) {
-                                       fprintf( stderr, "Error: parse_syncrepl_line: "
-                                               "invalid interval \"%s\"\n", val );
-                                       return 1;
-                               }
-                               *mstr++ = '\0';
-                               sstr = strchr( mstr, ':' );
-                               if ( sstr == NULL ) {
-                                       fprintf( stderr, "Error: parse_syncrepl_line: "
-                                               "invalid interval \"%s\"\n", val );
-                                       return 1;
-                               }
-                               *sstr++ = '\0';
-
-                               dd = atoi( dstr );
-                               hh = atoi( hstr );
-                               mm = atoi( mstr );
-                               ss = atoi( sstr );
-                               if (( hh > 24 ) || ( hh < 0 ) ||
-                                       ( mm > 60 ) || ( mm < 0 ) ||
-                                       ( ss > 60 ) || ( ss < 0 ) || ( dd < 0 )) {
-                                       fprintf( stderr, "Error: parse_syncrepl_line: "
-                                               "invalid interval \"%s\"\n", val );
-                                       return 1;
-                               }
-                               si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
+                       dstr = val;
+                       hstr = strchr( dstr, ':' );
+                       if ( hstr == NULL ) {
+                               fprintf( stderr, "Error: parse_syncrepl_line: "
+                                       "invalid interval \"%s\"\n", val );
+                               return 1;
                        }
+                       *hstr++ = '\0';
+                       mstr = strchr( hstr, ':' );
+                       if ( mstr == NULL ) {
+                               fprintf( stderr, "Error: parse_syncrepl_line: "
+                                       "invalid interval \"%s\"\n", val );
+                               return 1;
+                       }
+                       *mstr++ = '\0';
+                       sstr = strchr( mstr, ':' );
+                       if ( sstr == NULL ) {
+                               fprintf( stderr, "Error: parse_syncrepl_line: "
+                                       "invalid interval \"%s\"\n", val );
+                               return 1;
+                       }
+                       *sstr++ = '\0';
+
+                       dd = atoi( dstr );
+                       hh = atoi( hstr );
+                       mm = atoi( mstr );
+                       ss = atoi( sstr );
+                       if (( hh > 24 ) || ( hh < 0 ) ||
+                               ( mm > 60 ) || ( mm < 0 ) ||
+                               ( ss > 60 ) || ( ss < 0 ) || ( dd < 0 )) {
+                               fprintf( stderr, "Error: parse_syncrepl_line: "
+                                       "invalid interval \"%s\"\n", val );
+                               return 1;
+                       }
+                       si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
+
                        if ( si->si_interval < 0 ) {
                                fprintf( stderr, "Error: parse_syncrepl_line: "
                                        "invalid interval \"%ld\"\n",