From: Pierangelo Masarati Date: Mon, 27 Sep 2004 23:04:34 +0000 (+0000) Subject: minor cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~491 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39195e48a3f16a3e922ba1071eb4c92a9002f1f5;p=openldap minor cleanup --- diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 8ba7e1409b..bdf2666ed9 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -804,7 +804,7 @@ static int parsePagedResults ( return LDAP_PROTOCOL_ERROR; } - if ( ctrl->ldctl_value.bv_len == 0 ) { + if ( BER_BVISEMPTY( &ctrl->ldctl_value ) ) { rs->sr_text = "paged results control value is empty (or absent)"; return LDAP_PROTOCOL_ERROR; } @@ -890,6 +890,7 @@ static int parsePagedResults ( * NOTE: this assumes that the op->ors_slimit be set * before the controls are parsed. */ + if ( op->ors_slimit > 0 && size >= op->ors_slimit ) { op->o_pagedresults = SLAP_IGNORED_CONTROL;