From: Emmanuel Dreyfus Date: Fri, 9 May 2008 21:49:47 +0000 (+0000) Subject: Fix an error in debug message, and correctly keep track of attribute count X-Git-Tag: LOCKER_IDS~170 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8378550685b57e473908ea7cc860b01618fe954;p=openldap Fix an error in debug message, and correctly keep track of attribute count after a mod_replace --- diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c index 7d2bf73aaa..bb4d9504b1 100644 --- a/servers/slapd/overlays/constraint.c +++ b/servers/slapd/overlays/constraint.c @@ -601,14 +601,16 @@ constraint_modify( Operation *op, SlapReply *rs ) Debug(LDAP_DEBUG_TRACE, "==> constraint_modify ce = %d, " "ca = %d, cp->count = %d\n", - ca, ce, cp->count); + ce, ca, cp->count); if (m->sml_op == LDAP_MOD_ADD) if (ca + ce > cp->count) goto mod_violation; - if (m->sml_op == LDAP_MOD_REPLACE) + if (m->sml_op == LDAP_MOD_REPLACE) { if (ca > cp->count) goto mod_violation; + ce = ca; + } } /* DELETE are to be ignored beyond this point */