From: Pierangelo Masarati Date: Thu, 21 Apr 2005 23:35:00 +0000 (+0000) Subject: add a consistency check X-Git-Tag: OPENLDAP_AC_BP~842 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=22aed7ddf9eaadeeefaa83a6079b0c94f75b2a37;p=openldap add a consistency check --- diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index ee0f46daab..5e0b3e6e99 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -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 );