/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
ad.bv_val = strchr( oc.bv_val, '/' );
if ( ad.bv_val != NULL ) {
const char *text = NULL;
- int rc;
oc.bv_len = ad.bv_val - oc.bv_val;
if ( group_ad == NULL ) {
const char *text = NULL;
- int rc;
rc = slap_str2ad( SLAPD_GROUP_ATTR, &group_ad, &text );
{
char *ptr;
- if ( !bv || !bv->bv_val ) return;
+ if ( !bv || !bv->bv_val ) return -1;
ptr = bv->bv_val;
*ptr = '\0';
bv->bv_len = ptr - bv->bv_val;
}
+
+ return 0;
}
int
op->ors_slimit = SLAP_NO_LIMIT;
}
+ /* if paged results and slimit are requested */
+ if ( get_pagedresults( op ) > SLAP_CONTROL_IGNORED &&
+ op->ors_slimit != SLAP_NO_LIMIT ) {
+ PagedResultsState *ps = op->o_pagedresults_state;
+ int total = op->ors_slimit - ps->ps_count;
+ if ( total > 0 ) {
+ op->ors_slimit = total;
+ } else {
+ op->ors_slimit = 0;
+ }
+ }
+
/* if not root, get appropriate limits */
} else {
( void ) limits_get( op, &op->o_ndn, &op->ors_limit );