]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/compare.c
fix ITS#5959 fix
[openldap] / servers / slapd / compare.c
index 900f585fa4a8d2031f6ac4ed84060cc7b4f4fcba..1e9376a701f9f13cfbac4ed8a049d0cbc0e0f824 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ do_compare(
        struct berval dn = BER_BVNULL;
        struct berval desc = BER_BVNULL;
        struct berval value = BER_BVNULL;
-       AttributeAssertion ava = { 0 };
+       AttributeAssertion ava = ATTRIBUTEASSERTION_INIT;
 
        Debug( LDAP_DEBUG_TRACE, "%s do_compare\n",
                op->o_log_prefix, 0, 0 );
@@ -384,10 +384,10 @@ static int compare_entry(
                        break;
                }
 
-               if ( value_find_ex( ava->aa_desc,
+               if ( attr_valfind( a, 
                        SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH |
                                SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH,
-                       a->a_nvals, &ava->aa_value, op->o_tmpmemctx ) == 0 )
+                       &ava->aa_value, NULL, op->o_tmpmemctx ) == 0 )
                {
                        rc = LDAP_COMPARE_TRUE;
                        break;