X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-monitor%2Fentry.c;h=e31e9183ce72c10e51bde763e6d19476755e6cec;hb=02cff39398a62956aa3a86b834fb317415ccc601;hp=a7b83d489fb9be3175b0d44e4e468e67a32ca858;hpb=7cba7d0b396876431d6df53c92bc0fb733828534;p=openldap diff --git a/servers/slapd/back-monitor/entry.c b/servers/slapd/back-monitor/entry.c index a7b83d489f..e31e9183ce 100644 --- a/servers/slapd/back-monitor/entry.c +++ b/servers/slapd/back-monitor/entry.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2001-2006 The OpenLDAP Foundation. + * Copyright 2001-2011 The OpenLDAP Foundation. * Portions Copyright 2001-2003 Pierangelo Masarati. * All rights reserved. * @@ -42,11 +42,7 @@ monitor_entry_update( mp = ( monitor_entry_t * )e->e_private; - if ( mp->mp_info && mp->mp_info->mss_update ) { - rc = mp->mp_info->mss_update( op, rs, e ); - } - - if ( rc == SLAP_CB_CONTINUE && mp->mp_cb ) { + if ( mp->mp_cb ) { struct monitor_callback_t *mc; for ( mc = mp->mp_cb; mc; mc = mc->mc_next ) { @@ -59,6 +55,10 @@ monitor_entry_update( } } + if ( rc == SLAP_CB_CONTINUE && mp->mp_info && mp->mp_info->mss_update ) { + rc = mp->mp_info->mss_update( op, rs, e ); + } + if ( rc == SLAP_CB_CONTINUE ) { rc = LDAP_SUCCESS; } @@ -115,11 +115,7 @@ monitor_entry_modify( mp = ( monitor_entry_t * )e->e_private; - if ( mp->mp_info && mp->mp_info->mss_modify ) { - rc = mp->mp_info->mss_modify( op, rs, e ); - } - - if ( rc == SLAP_CB_CONTINUE && mp->mp_cb ) { + if ( mp->mp_cb ) { struct monitor_callback_t *mc; for ( mc = mp->mp_cb; mc; mc = mc->mc_next ) { @@ -132,6 +128,10 @@ monitor_entry_modify( } } + if ( rc == SLAP_CB_CONTINUE && mp->mp_info && mp->mp_info->mss_modify ) { + rc = mp->mp_info->mss_modify( op, rs, e ); + } + if ( rc == SLAP_CB_CONTINUE ) { rc = LDAP_SUCCESS; } @@ -193,7 +193,7 @@ monitor_entry_stub( if ( rc ) return NULL; - e = ch_calloc( 1, sizeof( Entry )); + e = entry_alloc(); if ( e ) { struct berval nrdn;