From ef7883c02811dbfaf5ae220ff04b9485a1dee5f8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 1 Mar 2002 19:07:15 +0000 Subject: [PATCH] Fix substring index error handling --- servers/slapd/back-bdb/filterindex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-bdb/filterindex.c b/servers/slapd/back-bdb/filterindex.c index 9e5caa29ab..2e420fd442 100644 --- a/servers/slapd/back-bdb/filterindex.c +++ b/servers/slapd/back-bdb/filterindex.c @@ -482,24 +482,24 @@ substring_candidates( Debug( LDAP_DEBUG_ANY, "<= bdb_substring_candidates: index_param failed (%d)\n", rc, 0, 0 ); - return 0; + return rc; } if ( db == NULL ) { Debug( LDAP_DEBUG_ANY, "<= bdb_substring_candidates not indexed\n", 0, 0, 0 ); - return 0; + return -1; } mr = sub->sa_desc->ad_type->sat_substr; if( !mr ) { - return 0; + return -1; } if( !mr->smr_filter ) { - return 0; + return -1; } rc = (mr->smr_filter)( @@ -515,7 +515,7 @@ substring_candidates( Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates: (%s) MR filter failed (%d)\n", sub->sa_desc->ad_cname.bv_val, rc, 0 ); - return 0; + return rc; } if( keys == NULL ) { -- 2.39.5