]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backglue.c
Allow identical duplicate OID macro definitions. Makes it harmless
[openldap] / servers / slapd / backglue.c
index 3c7cfc63219576403f05d570340feef888fb4749..2bd5cbd701ba36e3f1d0f6458f5b354e91aa3fbb 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2006 The OpenLDAP Foundation.
+ * Copyright 2001-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -87,6 +87,15 @@ typedef struct glue_state {
        int nctrls;
 } glue_state;
 
+static int
+glue_op_cleanup( Operation *op, SlapReply *rs )
+{
+       /* This is not a final result */
+       if (rs->sr_type == REP_RESULT )
+               rs->sr_type = REP_GLUE_RESULT;
+       return SLAP_CB_CONTINUE;
+}
+
 static int
 glue_op_response ( Operation *op, SlapReply *rs )
 {
@@ -165,8 +174,6 @@ glue_op_response ( Operation *op, SlapReply *rs )
                        gs->nctrls = j;
                        gs->ctrls = newctrls;
                }
-               /* This is not a final result */
-               rs->sr_type = REP_INTERMEDIATE;
        }
        return 0;
 }
@@ -194,6 +201,7 @@ glue_op_func ( Operation *op, SlapReply *rs )
        case LDAP_REQ_DELETE: which = op_delete; break;
        case LDAP_REQ_MODIFY: which = op_modify; break;
        case LDAP_REQ_MODRDN: which = op_modrdn; break;
+       case LDAP_REQ_EXTENDED: which = op_extended; break;
        default: assert( 0 ); break;
        }
 
@@ -211,7 +219,6 @@ glue_op_func ( Operation *op, SlapReply *rs )
 static int
 glue_response ( Operation *op, SlapReply *rs )
 {
-       slap_overinst   *on = (slap_overinst *)op->o_bd->bd_info;
        BackendDB *be = op->o_bd;
        be = glue_back_select (op->o_bd, &op->o_req_ndn);
 
@@ -318,7 +325,7 @@ glue_op_search ( Operation *op, SlapReply *rs )
        int i;
        long stoptime = 0, starttime;
        glue_state gs = {NULL, NULL, NULL, 0, 0, 0, 0};
-       slap_callback cb = { NULL, glue_op_response, NULL, NULL };
+       slap_callback cb = { NULL, glue_op_response, glue_op_cleanup, NULL };
        int scope0, tlimit0;
        struct berval dn, ndn, *pdn;
 
@@ -757,13 +764,14 @@ glue_tool_entry_put (
 static int
 glue_tool_entry_reindex (
        BackendDB *b0,
-       ID id
+       ID id,
+       AttributeDescription **adv
 )
 {
        if (!glueBack || !glueBack->be_entry_reindex)
                return -1;
 
-       return glueBack->be_entry_reindex (glueBack, id);
+       return glueBack->be_entry_reindex (glueBack, id, adv);
 }
 
 static int
@@ -948,7 +956,7 @@ glue_sub_attach()
 
                        /* If it's not already configured, set up the overlay */
                        if ( !SLAP_GLUE_INSTANCE( be )) {
-                               rc = overlay_config( be, glue.on_bi.bi_type );
+                               rc = overlay_config( be, glue.on_bi.bi_type, -1, NULL );
                                if ( rc )
                                        break;
                        }
@@ -1024,6 +1032,7 @@ glue_sub_init()
        glue.on_bi.bi_op_modrdn = glue_op_func;
        glue.on_bi.bi_op_add = glue_op_func;
        glue.on_bi.bi_op_delete = glue_op_func;
+       glue.on_bi.bi_extended = glue_op_func;
 
        glue.on_bi.bi_chk_referrals = glue_chk_referrals;
        glue.on_bi.bi_chk_controls = glue_chk_controls;