1 /* entry.c - monitor backend entry handling routines */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2005 The OpenLDAP Foundation.
6 * Portions Copyright 2001-2003 Pierangelo Masarati.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted only as authorized by the OpenLDAP
13 * A copy of this license is available in file LICENSE in the
14 * top-level directory of the distribution or, alternatively, at
15 * <http://www.OpenLDAP.org/license.html>.
18 * This work was initially developed by Pierangelo Masarati for inclusion
19 * in OpenLDAP Software.
25 #include "back-monitor.h"
33 monitor_info_t *mi = ( monitor_info_t * )op->o_bd->be_private;
39 assert( e->e_private != NULL );
41 mp = ( monitor_entry_t * )e->e_private;
43 if ( mp->mp_info && mp->mp_info->mss_update ) {
44 rc = ( *mp->mp_info->mss_update )( op, e );
47 if ( rc == 0 && mp->mp_cb ) {
48 struct monitor_callback_t *mc;
50 for ( mc = mp->mp_cb; mc; mc = mc->mc_next ) {
51 rc = ( *mc->mc_update )( op, e, mc->mc_private );
69 monitor_info_t *mi = ( monitor_info_t * )op->o_bd->be_private;
73 assert( e_parent != NULL );
74 assert( e_parent->e_private != NULL );
77 mp = ( monitor_entry_t * )e_parent->e_private;
79 if ( mp->mp_info && mp->mp_info->mss_create ) {
80 return ( *mp->mp_info->mss_create )( op, ndn, e_parent, ep );
92 monitor_info_t *mi = ( monitor_info_t * )op->o_bd->be_private;
97 assert( e->e_private != NULL );
99 mp = ( monitor_entry_t * )e->e_private;
101 if ( mp->mp_info && mp->mp_info->mss_modify ) {
102 return ( *mp->mp_info->mss_modify )( op, e );
109 monitor_entry_test_flags(
114 assert( mp != NULL );
116 return( ( mp->mp_flags & cond ) || ( mp->mp_info->mss_flags & cond ) );
120 monitor_entrypriv_create( void )
124 mp = ( monitor_entry_t * )ch_calloc( sizeof( monitor_entry_t ), 1 );
127 mp->mp_children = NULL;
129 mp->mp_flags = MONITOR_F_NONE;