From 22aed7ddf9eaadeeefaa83a6079b0c94f75b2a37 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 21 Apr 2005 23:35:00 +0000 Subject: [PATCH] add a consistency check --- servers/slapd/attr.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 ); -- 2.39.5