1 /* entry.c - monitor backend entry handling routines */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2004 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 struct monitorinfo *mi =
34 (struct monitorinfo *)op->o_bd->be_private;
35 struct monitorentrypriv *mp;
40 assert( e->e_private != NULL );
42 mp = ( struct monitorentrypriv * )e->e_private;
44 if ( mp->mp_info && mp->mp_info->mss_update ) {
45 rc = ( *mp->mp_info->mss_update )( op, e );
48 if ( rc == 0 && mp->mp_update ) {
49 rc = ( *mp->mp_update )( op, e );
63 struct monitorinfo *mi = (struct monitorinfo *)op->o_bd->be_private;
64 struct monitorentrypriv *mp;
67 assert( e_parent != NULL );
68 assert( e_parent->e_private != NULL );
71 mp = ( struct monitorentrypriv * )e_parent->e_private;
73 if ( mp->mp_info && mp->mp_info->mss_create ) {
74 return ( *mp->mp_info->mss_create )( op, ndn, e_parent, ep );
86 struct monitorinfo *mi = (struct monitorinfo *)op->o_bd->be_private;
87 struct monitorentrypriv *mp;
91 assert( e->e_private != NULL );
93 mp = ( struct monitorentrypriv * )e->e_private;
95 if ( mp->mp_info && mp->mp_info->mss_modify ) {
96 return ( *mp->mp_info->mss_modify )( op, e );
103 monitor_entry_test_flags(
104 struct monitorentrypriv *mp,
108 assert( mp != NULL );
110 return( ( mp->mp_flags & cond ) || ( mp->mp_info->mss_flags & cond ) );