]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/distproc.c
Merge remote branch 'origin/mdb.master'
[openldap] / servers / slapd / back-ldap / distproc.c
index 800abf7f11627b45bd9fbfd4b5a0cf24f5c41e34..7fb41d4b7b5858ff508e61b46e5449a9d9700890 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2005-2007 The OpenLDAP Foundation.
+ * Copyright 2005-2011 The OpenLDAP Foundation.
  * Portions Copyright 2003 Howard Chu.
  * All rights reserved.
  *
@@ -107,6 +107,7 @@ typedef struct ContinuationReference_t {
 } ContinuationReference_t;
 #define        CR_INIT         { NULL, BER_BVNULL, LDAP_DP_RT_UNKNOWN, BER_BVNULL, LDAP_DP_SS_UNKNOWN, NULL, BER_BVNULL }
 
+#ifdef unused
 static struct berval   bv2rt[] = {
        BER_BVC( "superior" ),
        BER_BVC( "subordinate" ),
@@ -196,6 +197,7 @@ ldap_distproc_str2ss( const char *s )
        ber_str2bv( s, 0, 0, &bv );
        return ldap_distproc_bv2ss( &bv );
 }
+#endif /* unused */
 
 /*
  * NOTE: this overlay assumes that the chainingBehavior control
@@ -239,12 +241,6 @@ static int ldap_distproc_db_init_one( BackendDB *be );
 #define        ldap_distproc_db_close_one(be)          (0)
 #define        ldap_distproc_db_destroy_one(be, ca)    (lback)->bi_db_destroy( (be), (ca) )
 
-static int
-ldap_distproc_parse_ctrl(
-       Operation       *op,
-       SlapReply       *rs,
-       LDAPControl     *ctrl );
-
 static int
 ldap_distproc_uri_cmp( const void *c1, const void *c2 )
 {
@@ -298,7 +294,7 @@ ldap_distproc_operational( Operation *op, SlapReply *rs )
         * database.  This fix is likely to intercept also entries
         * generated by back-perl and so. */
        if ( rs->sr_entry->e_private == NULL ) {
-               return 0;
+               return LDAP_SUCCESS;
        }
 
        return SLAP_CB_CONTINUE;
@@ -472,9 +468,9 @@ ldap_distproc_cfadd_apply( void *datum, void *arg )
        struct berval                   bv;
 
        /* FIXME: should not hardcode "olcDatabase" here */
-       bv.bv_len = snprintf( lca->ca->msg, sizeof( lca->ca->msg ),
+       bv.bv_len = snprintf( lca->ca->cr_msg, sizeof( lca->ca->cr_msg ),
                "olcDatabase={%d}%s", lca->count, lback->bi_type );
-       bv.bv_val = lca->ca->msg;
+       bv.bv_val = lca->ca->cr_msg;
 
        lca->ca->be->be_private = (void *)li;
        config_build_entry( lca->op, lca->rs, lca->p->e_private, lca->ca,
@@ -568,7 +564,7 @@ distproc_cfgen( ConfigArgs *c )
 static int
 ldap_distproc_db_init(
        BackendDB *be,
-       ConfigArgs *ca )
+       ConfigReply *cr )
 {
        slap_overinst   *on = (slap_overinst *)be->bd_info;
        ldap_distproc_t *lc = NULL;
@@ -761,7 +757,7 @@ ldap_distproc_db_func(
 static int
 ldap_distproc_db_open(
        BackendDB       *be,
-       ConfigArgs      *ca )
+       ConfigReply     *cr )
 {
        return ldap_distproc_db_func( be, db_open );
 }
@@ -769,7 +765,7 @@ ldap_distproc_db_open(
 static int
 ldap_distproc_db_close(
        BackendDB       *be,
-       ConfigArgs      *ca )
+       ConfigReply     *cr )
 {
        return ldap_distproc_db_func( be, db_close );
 }
@@ -777,7 +773,7 @@ ldap_distproc_db_close(
 static int
 ldap_distproc_db_destroy(
        BackendDB       *be,
-       ConfigArgs      *ca )
+       ConfigReply     *cr )
 {
        slap_overinst   *on = (slap_overinst *) be->bd_info;
        ldap_distproc_t *lc = (ldap_distproc_t *)on->on_bi.bi_private;