From d3058532c979f9f0202a330d3f8173c2cb87dcbb Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 29 Apr 2002 10:12:50 +0000 Subject: [PATCH] honor limits if below soft limit --- servers/slapd/back-bdb/search.c | 4 ++-- servers/slapd/back-ldap/search.c | 4 ++-- servers/slapd/back-ldbm/search.c | 4 ++-- servers/slapd/back-meta/search.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 6297633eb8..300424ff04 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -209,7 +209,7 @@ bdb_search( /* if requested limit higher than hard limit, abort */ } else if ( tlimit > limit->lms_t_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_t_hard == 0 ) { + if ( limit->lms_t_hard == 0 && tlimit > limit->lms_t_soft ) { tlimit = limit->lms_t_soft; /* positive hard limit means abort */ @@ -231,7 +231,7 @@ bdb_search( /* if requested limit higher than hard limit, abort */ } else if ( slimit > limit->lms_s_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_s_hard == 0 ) { + if ( limit->lms_s_hard == 0 && slimit > limit->lms_s_soft ) { slimit = limit->lms_s_soft; /* positive hard limit means abort */ diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 00777661d0..d85babb9cd 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -99,7 +99,7 @@ ldap_back_search( /* if requested limit higher than hard limit, abort */ if ( !isroot && tlimit > limit->lms_t_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_t_hard == 0 ) { + if ( limit->lms_t_hard == 0 && tlimit > limit->lms_t_soft ) { tlimit = limit->lms_t_soft; /* positive hard limit means abort */ @@ -117,7 +117,7 @@ ldap_back_search( /* if requested limit higher than hard limit, abort */ if ( !isroot && slimit > limit->lms_s_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_s_hard == 0 ) { + if ( limit->lms_s_hard == 0 && slimit > limit->lms_s_soft ) { slimit = limit->lms_s_soft; /* positive hard limit means abort */ diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index a82ffe7f90..3bdad07caa 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -248,7 +248,7 @@ searchit: /* if requested limit higher than hard limit, abort */ } else if ( tlimit > limit->lms_t_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_t_hard == 0 ) { + if ( limit->lms_t_hard == 0 && tlimit > limit->lms_t_soft ) { tlimit = limit->lms_t_soft; /* positive hard limit means abort */ @@ -270,7 +270,7 @@ searchit: /* if requested limit higher than hard limit, abort */ } else if ( slimit > limit->lms_s_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_s_hard == 0 ) { + if ( limit->lms_s_hard == 0 && slimit > limit->lms_s_soft ) { slimit = limit->lms_s_soft; /* positive hard limit means abort */ diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 6e8f2def32..7d00e2a2ff 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -159,7 +159,7 @@ meta_back_search( /* if requested limit higher than hard limit, abort */ if ( !isroot && tlimit > limit->lms_t_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_t_hard == 0 ) { + if ( limit->lms_t_hard == 0 && tlimit > limit->lms_t_soft ) { tlimit = limit->lms_t_soft; /* positive hard limit means abort */ @@ -177,7 +177,7 @@ meta_back_search( /* if requested limit higher than hard limit, abort */ if ( !isroot && slimit > limit->lms_s_hard ) { /* no hard limit means use soft instead */ - if ( limit->lms_s_hard == 0 ) { + if ( limit->lms_s_hard == 0 && slimit > limit->lms_s_soft ) { slimit = limit->lms_s_soft; /* positive hard limit means abort */ -- 2.39.5