]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/repl.c
Fixup bdb_entry_release now that entry_decode uses two memory blocks
[openldap] / servers / slapd / repl.c
index e309d942cfc6cf958485eee50b1c2eb9717b0661..dff5b5c82bc7b741aebb3f0f16d6ba4f0b5e9e65 100644 (file)
@@ -46,6 +46,30 @@ add_replica_info(
        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,