X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-monitor%2Flog.c;h=d772fd260f023fdaade5db251db3058a8220f8ea;hb=0394c805abe5208f43255aff3b7c24a3337d2529;hp=5683460eb1a88ed7ce4aceb414c73a2bc920e669;hpb=2a9afa55a755bc47029cc0653725847b49af7c6f;p=openldap diff --git a/servers/slapd/back-monitor/log.c b/servers/slapd/back-monitor/log.c index 5683460eb1..d772fd260f 100644 --- a/servers/slapd/back-monitor/log.c +++ b/servers/slapd/back-monitor/log.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2001-2006 The OpenLDAP Foundation. + * Copyright 2001-2009 The OpenLDAP Foundation. * Portions Copyright 2001-2003 Pierangelo Masarati. * All rights reserved. * @@ -111,7 +111,7 @@ monitor_subsys_log_modify( int rc = LDAP_OTHER; int newlevel = ldap_syslog; Attribute *save_attrs; - Modifications *modlist = op->oq_modify.rs_modlist; + Modifications *modlist = op->orm_modlist; Modifications *ml; ldap_pvt_thread_mutex_lock( &monitor_log_mutex ); @@ -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;