From a07d3630cb2a3b5c26386e2085676c20f1e5e0d0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 21 May 2010 17:47:17 +0000 Subject: [PATCH] Quit send loops if slapd is shutting down --- servers/slapd/overlays/sssvlv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c index c70425d02e..a024db2cc0 100644 --- a/servers/slapd/overlays/sssvlv.c +++ b/servers/slapd/overlays/sssvlv.c @@ -471,7 +471,9 @@ range_err: be = op->o_bd; for ( i=0; iavl_data; - + + if ( slapd_shutdown ) break; + op->o_bd = select_backend( &sn->sn_dn, 0 ); e = NULL; rc = be_entry_get_rw( op, &sn->sn_dn, NULL, NULL, 0, &e ); @@ -503,6 +505,8 @@ static void send_page( Operation *op, SlapReply *rs, sort_op *so ) while ( cur_node && rs->sr_nentries < so->so_page_size ) { sort_node *sn = cur_node->avl_data; + if ( slapd_shutdown ) break; + next_node = tavl_next( cur_node, TAVL_DIR_RIGHT ); op->o_bd = select_backend( &sn->sn_dn, 0 ); -- 2.39.5