From a8378550685b57e473908ea7cc860b01618fe954 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 9 May 2008 21:49:47 +0000 Subject: [PATCH] Fix an error in debug message, and correctly keep track of attribute count after a mod_replace --- servers/slapd/overlays/constraint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 */ -- 2.39.5