]> git.sur5r.net Git - openldap/commitdiff
add a consistency check
authorPierangelo Masarati <ando@openldap.org>
Thu, 21 Apr 2005 23:35:00 +0000 (23:35 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 21 Apr 2005 23:35:00 +0000 (23:35 +0000)
servers/slapd/attr.c

index ee0f46daabc5d87fc631f06bb2c5f13295a6d49c..5e0b3e6e99191e816289e5f568e885213f7f71eb 100644 (file)
@@ -192,6 +192,13 @@ attr_merge(
 #ifdef LDAP_COMP_MATCH
                (*a)->a_comp_data = NULL;
 #endif
+       } else {
+               /*
+                * FIXME: if the attribute already exists, the presence
+                * of nvals and the value of (*a)->a_nvals must be consistent
+                */
+               assert( ( nvals == NULL && (*a)->a_nvals == (*a)->a_vals )
+                               || ( nvals != NULL && (*a)->a_nvals != (*a)->a_vals ) );
        }
 
        rc = value_add( &(*a)->a_vals, vals );