]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/refint.c
ITS#4225 added proxyCacheQueries parameter for configuring max_queries
[openldap] / servers / slapd / overlays / refint.c
index a233fec070d1f7f77449f47df535ea16861bd014..66d597fd36f23f0f47dbef2e9db7454098ef0972 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2005 The OpenLDAP Foundation.
+ * Copyright 2004-2006 The OpenLDAP Foundation.
  * Portions Copyright 2004 Symas Corporation.
  * All rights reserved.
  *
@@ -570,7 +570,7 @@ refint_response(
        rc = nop.o_bd->be_search(&nop, &nrs);
 
        ch_free( nop.ors_filterstr.bv_val );
-       while ( fptr = ftop.f_or ) {
+       while ( (fptr = ftop.f_or) != NULL ) {
                ftop.f_or = fptr->f_next;
                ch_free( fptr );
        }
@@ -621,10 +621,6 @@ refint_response(
        */
 
        for(dp = dd.mods; dp; dp = dp->next) {
-               Modifications **tail, *m;
-
-               for(m = dp->mm; m && m->sml_next; m = m->sml_next);
-               tail = &m->sml_next;
                nop.o_req_dn    = dp->dn;
                nop.o_req_ndn   = dp->dn;
                nop.o_bd = select_backend(&dp->dn, 0, 1);
@@ -637,8 +633,6 @@ refint_response(
                nop.orm_modlist = dp->mm;       /* callback did all the work */
                nop.o_dn = refint_dn;
                nop.o_ndn = refint_dn;
-               rs->sr_err = slap_mods_opattrs( &nop, nop.orm_modlist,
-                       tail, &rs->sr_text, NULL, 0, 1 );
                nop.o_dn = nop.o_bd->be_rootdn;
                nop.o_ndn = nop.o_bd->be_rootndn;
                if(rs->sr_err != LDAP_SUCCESS) goto done;
@@ -653,7 +647,7 @@ done:
        for(dp = dd.mods; dp; dp = dd.mods) {
                dd.mods = dp->next;
                ch_free(dp->dn.bv_val);
-               slap_mods_free(dp->mm);
+               slap_mods_free(dp->mm, 1);
        }
        dd.mods = NULL;
 
@@ -665,7 +659,7 @@ done:
 ** it expects to be called automagically during dynamic module initialization
 */
 
-int refint_init() {
+int refint_initialize() {
 
        /* statically declared just after the #includes at top */
        refint.on_bi.bi_type = "refint";
@@ -680,7 +674,7 @@ int refint_init() {
 
 #if SLAPD_OVER_REFINT == SLAPD_MOD_DYNAMIC && defined(PIC)
 int init_module(int argc, char *argv[]) {
-       return refint_init();
+       return refint_initialize();
 }
 #endif