#include "lutil.h"
#include "back-monitor.h"
+static int
+monitor_subsys_rww_update(
+ Operation *op,
+ SlapReply *rs,
+ Entry *e );
+
enum {
MONITOR_RWW_READ = 0,
MONITOR_RWW_WRITE,
assert( be != NULL );
+ ms->mss_update = monitor_subsys_rww_update;
+
mi = ( monitor_info_t * )be->be_private;
if ( monitor_cache_get( mi, &ms->mss_ndn, &e_conn ) ) {
ber_dupbv( &monitor_rww[ i ].nrdn, &nrdn );
BER_BVSTR( &bv, "0" );
- attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, &bv );
mp = monitor_entrypriv_create();
if ( mp == NULL ) {
return( 0 );
}
-int
+static int
monitor_subsys_rww_update(
Operation *op,
- Entry *e
-)
+ SlapReply *rs,
+ Entry *e )
{
monitor_info_t *mi = (monitor_info_t *)op->o_bd->be_private;
Connection *c;
}
if ( i == MONITOR_RWW_LAST ) {
- return 0;
+ return SLAP_CB_CONTINUE;
}
nconns = nwritewaiters = nreadwaiters = 0;
snprintf( buf, sizeof( buf ), "%ld", num );
a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
- assert( a );
+ assert( a != NULL );
len = strlen( buf );
if ( len > a->a_vals[ 0 ].bv_len ) {
a->a_vals[ 0 ].bv_val = ber_memrealloc( a->a_vals[ 0 ].bv_val, len + 1 );
if ( BER_BVISNULL( &a->a_vals[ 0 ] ) ) {
BER_BVZERO( &a->a_vals[ 0 ] );
- return( 0 );
+ return SLAP_CB_CONTINUE;
}
}
AC_MEMCPY( a->a_vals[ 0 ].bv_val, buf, len + 1 );
/* FIXME: touch modifyTimestamp? */
- return( 0 );
+ return SLAP_CB_CONTINUE;
}