Fix an error in debug message, and correctly keep track of attribute count

after a mod_replace
This commit is contained in:
Emmanuel Dreyfus 2008-05-09 21:49:47 +00:00
parent 8768d99013
commit a837855068

View file

@ -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 */