]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/compare.c
Silence a warning about ldap_debug
[openldap] / servers / slapd / back-ldap / compare.c
index 27e63dcfb8944ef7d62c7f77fce8de8cf2ebbb85..b926639b26e9d3eba86680791a64b337039373c1 100644 (file)
@@ -1,7 +1,7 @@
 /* compare.c - ldap backend compare function */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* This is an altered version */
@@ -57,7 +57,7 @@ ldap_back_compare(
 {
        struct ldapinfo *li = (struct ldapinfo *) be->be_private;
        struct ldapconn *lc;
-       char *mapped_oc, *mapped_at;
+       struct berval mapped_oc, mapped_at;
        struct berval mdn = { 0, NULL };
 
        lc = ldap_back_getconn(li, conn, op);
@@ -101,15 +101,15 @@ ldap_back_compare(
        }
 #endif /* !ENABLE_REWRITE */
 
-       mapped_oc = ldap_back_map(&li->oc_map, ava->aa_desc->ad_cname.bv_val, 0);
-       if (mapped_oc == NULL)
+       ldap_back_map(&li->oc_map, &ava->aa_desc->ad_cname, &mapped_oc, 0);
+       if (mapped_oc.bv_val == NULL)
                return( -1 );
 
-       mapped_at = ldap_back_map(&li->at_map, ava->aa_value->bv_val, 0);
-       if (mapped_at == NULL)
+       ldap_back_map(&li->at_map, &ava->aa_value, &mapped_at, 0);
+       if (mapped_at.bv_val == NULL)
                return( -1 );
 
-       ldap_compare_s( lc->ld, mdn.bv_val, mapped_oc, mapped_at );
+       ldap_compare_s( lc->ld, mdn.bv_val, mapped_oc.bv_val, mapped_at.bv_val );
 
        if ( mdn.bv_val != dn->bv_val ) {
                free( mdn.bv_val );