]> git.sur5r.net Git - openldap/commitdiff
Fix substring index error handling
authorKurt Zeilenga <kurt@openldap.org>
Fri, 1 Mar 2002 19:07:15 +0000 (19:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 1 Mar 2002 19:07:15 +0000 (19:07 +0000)
servers/slapd/back-bdb/filterindex.c

index 9e5caa29ab137328e85babcfb6ff263fb1a4c7ba..2e420fd442195fcf4205eb15785742de64bbb4ce 100644 (file)
@@ -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 ) {