Diff for /servers/slapd/overlays/pcache.c between versions 1.41.2.16 and 1.41.2.19

version 1.41.2.16, 2006/02/17 07:38:41 version 1.41.2.19, 2007/07/23 20:08:32
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/pcache.c,v 1.41.2.15 2006/02/17 02:07:35 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/pcache.c,v 1.41.2.18 2007/06/13 14:28:11 ralf Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 2003-2006 The OpenLDAP Foundation.   * Copyright 2003-2007 The OpenLDAP Foundation.
  * Portions Copyright 2003 IBM Corporation.   * Portions Copyright 2003 IBM Corporation.
  * Portions Copyright 2003 Symas Corporation.   * Portions Copyright 2003 Symas Corporation.
  * All rights reserved.   * All rights reserved.
Line 417  strings_containment(struct berval* store Line 417  strings_containment(struct berval* store
 static int  static int
 substr_containment_substr(Operation *op, Filter* stored, Filter* incoming)  substr_containment_substr(Operation *op, Filter* stored, Filter* incoming)
 {  {
         int i;  
         int rc = 0;          int rc = 0;
   
         struct berval init_incoming;          struct berval init_incoming;
Line 608  static void Line 607  static void
 free_query (CachedQuery* qc)  free_query (CachedQuery* qc)
 {  {
         Query* q = (Query*)qc;          Query* q = (Query*)qc;
         int i;  
   
         free(qc->q_uuid.bv_val);          free(qc->q_uuid.bv_val);
         filter_free(q->filter);          filter_free(q->filter);
Line 1026  cache_entries( Line 1024  cache_entries(
 }  }
   
 static int  static int
   pcache_op_cleanup( Operation *op, SlapReply *rs ) {
           slap_callback   *cb = op->o_callback;
           struct search_info *si = cb->sc_private;
           if ( si->query.save_attrs != NULL ) {
                   rs->sr_attrs = si->query.save_attrs;
                   op->ors_attrs = si->query.save_attrs;
           }
           op->o_callback = op->o_callback->sc_next;
           op->o_tmpfree( cb, op->o_tmpmemctx );
           return SLAP_CB_CONTINUE;
   }
   
   static int
 pcache_response(  pcache_response(
         Operation       *op,          Operation       *op,
         SlapReply       *rs )          SlapReply       *rs )
Line 1097  pcache_response( Line 1108  pcache_response(
                         filter_free( si->query.filter );                          filter_free( si->query.filter );
                 }                  }
   
                 /* free self */                  op->o_callback->sc_cleanup = pcache_op_cleanup;
                 op->o_callback->sc_cleanup = slap_freeself_cb;  
         }          }
         return SLAP_CB_CONTINUE;          return SLAP_CB_CONTINUE;
 }  }
Line 1205  pcache_op_search( Line 1215  pcache_op_search(
         cache_manager *cm = on->on_bi.bi_private;          cache_manager *cm = on->on_bi.bi_private;
         query_manager*          qm = cm->qm;          query_manager*          qm = cm->qm;
   
         int count;  
   
         int i = -1;          int i = -1;
   
         AttributeName   *filter_attrs = NULL;          AttributeName   *filter_attrs = NULL;
Line 1219  pcache_op_search( Line 1227  pcache_op_search(
         int             cacheable = 0;          int             cacheable = 0;
         int             fattr_cnt=0;          int             fattr_cnt=0;
         int             fattr_got_oc = 0;          int             fattr_got_oc = 0;
         int             oc_attr_absent = 1;  
   
         struct berval tempstr;          struct berval tempstr;
   
Line 2014  pcache_db_close( Line 2021  pcache_db_close(
         slap_overinst *on = (slap_overinst *)be->bd_info;          slap_overinst *on = (slap_overinst *)be->bd_info;
         cache_manager *cm = on->on_bi.bi_private;          cache_manager *cm = on->on_bi.bi_private;
         query_manager *qm = cm->qm;          query_manager *qm = cm->qm;
         int i, j, rc = 0;          int i, rc = 0;
   
         /* cleanup stuff inherited from the original database... */          /* cleanup stuff inherited from the original database... */
         cm->db.be_limits = NULL;          cm->db.be_limits = NULL;

Removed from v.1.41.2.16  
changed lines
  Added in v.1.41.2.19


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org