]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/log.c
Happy New Year
[openldap] / servers / slapd / back-monitor / log.c
index c1ba52cbbaa88c4243de0fc776759387c3981d87..a47c203c7c8135f8bf3065fa9c823973bf6b8c7b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2008 The OpenLDAP Foundation.
+ * Copyright 2001-2011 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -181,7 +181,7 @@ monitor_subsys_log_modify(
                }
 
                /* check that the entry still obeys the schema */
-               rc = entry_schema_check( op, e, save_attrs, 0, 0,
+               rc = entry_schema_check( op, e, save_attrs, 0, 0, NULL,
                        &text, textbuf, sizeof( textbuf ) );
                if ( rc != LDAP_SUCCESS ) {
                        rs->sr_err = rc;
@@ -395,6 +395,7 @@ delete_values( Operation *op, Entry *e, Modification *mod, int *newlevel )
                                a->a_vals[ k - 1 ] = a->a_vals[ k ];
                        }
                        BER_BVZERO( &a->a_vals[ k - 1 ] );
+                       a->a_numvals--;
 
                        break;
                }
@@ -409,6 +410,8 @@ delete_values( Operation *op, Entry *e, Modification *mod, int *newlevel )
 
        /* if no values remain, delete the entire attribute */
        if ( BER_BVISNULL( &a->a_vals[ 0 ] ) ) {
+               assert( a->a_numvals == 0 );
+
                /* should already be zero */
                *newlevel = 0;