X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-monitor%2Flog.c;h=6a390891d463c49949a3e2c02537464bc85c34cf;hb=63e843d2003ddf20f3725ad439991e769ffc792a;hp=607b6354a4c0a51e02068436680d7797243cd4f9;hpb=8045a0882ed4f3e46d0ea5f410c803047eeb644f;p=openldap diff --git a/servers/slapd/back-monitor/log.c b/servers/slapd/back-monitor/log.c index 607b6354a4..6a390891d4 100644 --- a/servers/slapd/back-monitor/log.c +++ b/servers/slapd/back-monitor/log.c @@ -31,6 +31,17 @@ #include "ldif.h" #include "back-monitor.h" +static int +monitor_subsys_log_destroy( + BackendDB *be, + monitor_subsys_t *ms ); + +static int +monitor_subsys_log_modify( + Operation *op, + SlapReply *rs, + Entry *e ); + /* * log mutex */ @@ -77,6 +88,9 @@ monitor_subsys_log_init( Entry *e; int i; + ms->mss_destroy = monitor_subsys_log_destroy; + ms->mss_modify = monitor_subsys_log_modify; + ldap_pvt_thread_mutex_init( &monitor_log_mutex ); mi = ( monitor_info_t * )be->be_private; @@ -118,7 +132,23 @@ monitor_subsys_log_init( return( 0 ); } -int +static int +monitor_subsys_log_destroy( + BackendDB *be, + monitor_subsys_t *ms ) +{ + int i; + + for ( i = 0; int_2_level[ i ].i != 0; i++ ) { + if ( !BER_BVISNULL( &int_2_level[ i ].n ) ) { + ch_free( int_2_level[ i ].n.bv_val ); + } + } + + return 0; +} + +static int monitor_subsys_log_modify( Operation *op, SlapReply *rs, @@ -197,8 +227,8 @@ monitor_subsys_log_modify( } /* check that the entry still obeys the schema */ - rc = entry_schema_check( be_monitor, e, save_attrs, - &text, textbuf, sizeof( textbuf ) ); + rc = entry_schema_check( op, e, save_attrs, 0, + &text, textbuf, sizeof( textbuf ) ); if ( rc != LDAP_SUCCESS ) { rs->sr_err = rc; goto cleanup;