]> git.sur5r.net Git - openldap/commitdiff
attrs=*,+ becmoes the default behavior when attrs are not specified in syncrepl defin...
authorJong Hyuk Choi <jongchoi@openldap.org>
Fri, 20 Aug 2004 16:26:58 +0000 (16:26 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Fri, 20 Aug 2004 16:26:58 +0000 (16:26 +0000)
servers/slapd/syncrepl.c

index 898b161f7f7fdc8499c1cad9cbcecdc59c509b2a..5986615852a1e09a9d3c0a04e229ebc1f678f220 100644 (file)
@@ -88,8 +88,14 @@ init_syncrepl(syncinfo_t *si)
 #endif
                }
 
+               /* Add Attributes */
+               for ( i = 0; sync_descs[ i ] != NULL; i++ ) {
+                       tmp[ n++ ] = ch_strdup ( sync_descs[i]->ad_cname.bv_val );
+                       tmp[ n ] = NULL;
+               }
+
        } else {
-               tmp = ( char ** ) ch_realloc( si->si_attrs, 5 * sizeof( char * ));
+               tmp = ( char ** ) ch_realloc( si->si_attrs, 3 * sizeof( char * ));
                if ( tmp == NULL ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, ERR, "out of memory\n", 0,0,0 );
@@ -98,15 +104,12 @@ init_syncrepl(syncinfo_t *si)
 #endif
                }
                tmp[ n++ ] = ch_strdup( "*" );
+               tmp[ n++ ] = ch_strdup( "+" );
+               tmp[ n ] = NULL;
        }
        
        si->si_attrs = tmp;
 
-       /* Add Attributes */
-       for ( i = 0; sync_descs[ i ] != NULL; i++ ) {
-               si->si_attrs[ n++ ] = ch_strdup ( sync_descs[i]->ad_cname.bv_val );
-               si->si_attrs[ n ] = NULL;
-       }
 }
 
 static int