From 26ce222b6ac2ee2194e2126eee7c0970844e6398 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 10 Dec 2013 18:08:36 -0800 Subject: [PATCH] ITS#7761 bail out of search if config is pausing --- servers/slapd/back-bdb/search.c | 3 +++ servers/slapd/back-mdb/search.c | 3 +++ servers/slapd/back-perl/search.c | 2 +- servers/slapd/back-sql/search.c | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 450f483ebf..06ea62a083 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -1038,6 +1038,9 @@ id_retry: break; default: /* entry not sent */ break; + case LDAP_BUSY: + send_ldap_result( op, rs ); + goto done; case LDAP_UNAVAILABLE: case LDAP_SIZELIMIT_EXCEEDED: if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED ) { diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c index 5cc0d28c00..86bcc1cfa6 100644 --- a/servers/slapd/back-mdb/search.c +++ b/servers/slapd/back-mdb/search.c @@ -977,6 +977,9 @@ notfound: break; default: /* entry not sent */ break; + case LDAP_BUSY: + send_ldap_result( op, rs ); + goto done; case LDAP_UNAVAILABLE: case LDAP_SIZELIMIT_EXCEEDED: if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED ) { diff --git a/servers/slapd/back-perl/search.c b/servers/slapd/back-perl/search.c index f3106aac83..d862a4a532 100644 --- a/servers/slapd/back-perl/search.c +++ b/servers/slapd/back-perl/search.c @@ -89,7 +89,7 @@ perl_back_search( rs->sr_flags = 0; rs->sr_attrs = NULL; rs->sr_entry = NULL; - if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED ) { + if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED || rs->sr_err == LDAP_BUSY ) { goto done; } } diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index 25d4479909..de0ae95f61 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -2460,6 +2460,7 @@ backsql_search( Operation *op, SlapReply *rs ) goto end_of_search; case LDAP_SIZELIMIT_EXCEEDED: + case LDAP_BUSY: goto send_results; } } -- 2.39.5