]> git.sur5r.net Git - openldap/commitdiff
Fix result when no VLV match
authorHoward Chu <hyc@openldap.org>
Mon, 13 Jul 2009 15:15:27 +0000 (15:15 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 13 Jul 2009 15:15:27 +0000 (15:15 +0000)
servers/slapd/overlays/sssvlv.c

index 7f16ac7cf3df417e660076ad4765c746707e7ec6..707f6820ea0d122592e0a654af5198e8016b4ea9 100644 (file)
@@ -427,7 +427,10 @@ range_err:
                for (i=1; i<sc->sc_nkeys; i++) {
                        BER_BVZERO( &sn->sn_vals[i] );
                }
-               cur_node = tavl_find2( so->so_tree, sn, node_cmp );
+               cur_node = tavl_find3( so->so_tree, sn, node_cmp, &j );
+               /* didn't find >= match */
+               if ( j > 0 )
+                       cur_node = NULL;
                op->o_tmpfree( sn, op->o_tmpmemctx );
 
                if ( !cur_node ) {