]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
happy belated new year
[openldap] / servers / slapd / modify.c
index 7adc30469c34ceeb1d5b24b6cc94f7b0a05f3299..92e9fc233654c3bcf10543a5f8135291d57f6d52 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2009 The OpenLDAP Foundation.
+ * Copyright 1998-2010 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -690,7 +690,7 @@ slap_sort_vals(
 #define        SWAP(a,b,tmp)   tmp=(a);(a)=(b);(b)=tmp
 #define        COMP(a,b)       match=0; rc = ordered_value_match( &match, \
                                                ad, mr, SLAP_MR_EQUALITY \
-                                                               | SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX \
+                                                               | SLAP_MR_VALUE_OF_ASSERTION_SYNTAX \
                                                                | SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH \
                                                                | SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, \
                                                                &(a), &(b), text );
@@ -808,7 +808,7 @@ slap_sort_vals(
                }
        }
        done:
-       if ( i >= 0 )
+       if ( match == 0 && i >= 0 )
                *dup = ix[i];
 
        /* For sorted attributes, put the values in index order */