add a consistency check

This commit is contained in:
Pierangelo Masarati 2005-04-21 23:35:00 +00:00
parent 17dbf7a49f
commit 22aed7ddf9

View File

@ -192,6 +192,13 @@ attr_merge(
#ifdef LDAP_COMP_MATCH #ifdef LDAP_COMP_MATCH
(*a)->a_comp_data = NULL; (*a)->a_comp_data = NULL;
#endif #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 ); rc = value_add( &(*a)->a_vals, vals );