return return_val;
}
+static int
+pcache_op_cleanup( Operation *op, SlapReply *rs ) {
+ slap_callback *cb = op->o_callback;
+ struct search_info *si = cb->sc_private;
+ if ( si->save_attrs != NULL ) {
+ rs->sr_attrs = si->save_attrs;
+ op->ors_attrs = si->save_attrs;
+ }
+ op->o_callback = op->o_callback->sc_next;
+ op->o_tmpfree( cb, op->o_tmpmemctx );
+}
+
static int
pcache_response(
Operation *op,
if ( si->save_attrs != NULL ) {
rs->sr_attrs = si->save_attrs;
op->ors_attrs = si->save_attrs;
- si->save_attrs = NULL;
}
if ( rs->sr_type == REP_SEARCH ) {
filter_free( si->query.filter );
}
- /* free self */
- op->o_callback->sc_cleanup = slap_freeself_cb;
+ op->o_callback->sc_cleanup = pcache_op_cleanup;
}
return SLAP_CB_CONTINUE;
}