/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003-2014 The OpenLDAP Foundation.
+ * Copyright 2003-2018 The OpenLDAP Foundation.
* Portions Copyright 2003 IBM Corporation.
* Portions Copyright 2003-2009 Symas Corporation.
* All rights reserved.
struct query_template_s;
typedef struct Qbase_s {
- Avlnode *scopes[4]; /* threaded AVL trees of cached queries */
+ TAvlnode *scopes[4]; /* threaded AVL trees of cached queries */
struct berval base;
int queries;
} Qbase;
p2 = strchr( p1, '=' );
if ( !p2 ) {
- if ( !descs )
+ if ( !descs ) {
+ ch_free( temp2 );
return -1;
+ }
break;
}
i = p2 - p1;
ad = NULL;
i = slap_bv2ad( &bv, &ad, text );
if ( i ) {
+ ch_free( temp2 );
ch_free( descs );
return -1;
}
}
if ( !t_cnt ) {
*text = "couldn't parse template";
+ ch_free(attrs);
return -1;
}
if ( !got_oc && !( set->flags & PC_GOT_OC )) {
} fstack;
static CachedQuery *
-find_filter( Operation *op, Avlnode *root, Filter *inputf, Filter *first )
+find_filter( Operation *op, TAvlnode *root, Filter *inputf, Filter *first )
{
Filter* fs;
Filter* fi;
MatchingRule* mrule = NULL;
int res=0, eqpass= 0;
int ret, rc, dir;
- Avlnode *ptr;
+ TAvlnode *ptr;
CachedQuery cq, *qc;
fstack *stack = NULL, *fsp;
QueryTemplate *temp;
Entry *e;
slap_callback cb = { 0 }, *sc;
- bindinfo bi;
+ bindinfo bi = { 0 };
bindcacheinfo *bci;
Operation op2;
int rc;
op2 = *op;
op2.o_dn = op->o_bd->be_rootdn;
op2.o_ndn = op->o_bd->be_rootndn;
- bi.bi_flags = 0;
op2.o_bd = &cm->db;
e = NULL;
*/
bi.bi_cm = cm;
bi.bi_templ = temp;
- bi.bi_cq = NULL;
- bi.bi_si = NULL;
bi.bi_cb.sc_response = pc_bind_search;
- bi.bi_cb.sc_cleanup = NULL;
bi.bi_cb.sc_private = &bi;
cb.sc_private = &bi;
cb.sc_response = pc_bind_resp;
sc->sc_response = pc_bind_save;
sc->sc_cleanup = NULL;
sc->sc_private = sc+1;
+ sc->sc_writewait = NULL;
bci = sc->sc_private;
sc->sc_next = op->o_callback;
op->o_callback = sc;
cb->sc_response = pcache_response;
cb->sc_cleanup = pcache_op_cleanup;
cb->sc_private = (cb+1);
+ cb->sc_writewait = 0;
si = cb->sc_private;
si->on = on;
si->query = query;