mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
all right, don't worry about free() by now
This commit is contained in:
parent
92909f0682
commit
61e06b4ef2
1 changed files with 20 additions and 34 deletions
|
|
@ -1210,49 +1210,35 @@ add_filter_attrs(
|
|||
* perform the remote query without control and cache all results,
|
||||
* performing the pagedResults search only within the client
|
||||
* and the proxy. This requires pcache to understand pagedResults. */
|
||||
static int
|
||||
proxy_cache_remove_paged_results(
|
||||
Operation *op,
|
||||
SlapReply *rs )
|
||||
{
|
||||
if ( op->o_pagedresults == SLAP_CONTROL_CRITICAL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "%s: "
|
||||
"critical pagedResults control disabled with proxy cache.\n",
|
||||
op->o_log_prefix, 0, 0 );
|
||||
|
||||
} else if ( op->o_pagedresults == SLAP_CONTROL_NONCRITICAL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "%s: "
|
||||
"non-critical pagedResults control disabled with proxy cache; stripped.\n",
|
||||
op->o_log_prefix, 0, 0 );
|
||||
}
|
||||
|
||||
assert( op->o_pagedresults_state != NULL );
|
||||
op->o_tmpfree( op->o_pagedresults_state, op->o_tmpmemctx );
|
||||
op->o_pagedresults_state = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
proxy_cache_chk_controls(
|
||||
Operation *op,
|
||||
SlapReply *rs )
|
||||
{
|
||||
int rc = SLAP_CB_CONTINUE;
|
||||
const char *non = "";
|
||||
const char *stripped = "";
|
||||
|
||||
if ( op->o_pagedresults ) {
|
||||
int tmprc;
|
||||
switch( op->o_pagedresults ) {
|
||||
case SLAP_CONTROL_NONCRITICAL:
|
||||
non = "non-";
|
||||
stripped = "; stripped";
|
||||
/* fallthru */
|
||||
|
||||
tmprc = slap_remove_control( op, rs, slap_cids.sc_pagedResults,
|
||||
proxy_cache_remove_paged_results );
|
||||
if ( tmprc != SLAP_CB_CONTINUE ) {
|
||||
rc = tmprc;
|
||||
}
|
||||
case SLAP_CONTROL_CRITICAL:
|
||||
Debug( LDAP_DEBUG_ANY, "%s: "
|
||||
"%scritical pagedResults control "
|
||||
"disabled with proxy cache%s.\n",
|
||||
op->o_log_prefix, non, stripped );
|
||||
|
||||
slap_remove_control( op, rs, slap_cids.sc_pagedResults, NULL );
|
||||
break;
|
||||
|
||||
default:
|
||||
rs->sr_err = SLAP_CB_CONTINUE;
|
||||
break;
|
||||
}
|
||||
|
||||
rs->sr_err = rc;
|
||||
|
||||
return rc;
|
||||
return rs->sr_err;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue