return( i );
}
+int
+add_replica_suffix(
+ Backend *be,
+ int nr,
+ const char *suffix
+)
+{
+ char *nsuffix = ch_strdup( suffix );
+ int rc = 0;
+
+ if ( dn_normalize( nsuffix ) != NULL ) {
+ if ( select_backend( nsuffix, 0 ) == be ) {
+ charray_add( &be->be_replica[nr]->ri_nsuffix, nsuffix );
+ } else {
+ rc = 1;
+ }
+ } else {
+ rc = 2;
+ }
+ free( nsuffix );
+
+ return( rc );
+}
+
void
replog(
Backend *be,
ml = change;
for ( ; ml != NULL; ml = ml->sml_next ) {
char *type;
- type = ml->sml_desc->ad_cname->bv_val;
+ type = ml->sml_desc->ad_cname.bv_val;
switch ( ml->sml_op ) {
case LDAP_MOD_ADD:
fprintf( fp, "add: %s\n", type );