From 39195e48a3f16a3e922ba1071eb4c92a9002f1f5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 27 Sep 2004 23:04:34 +0000 Subject: [PATCH] minor cleanup --- servers/slapd/controls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5