From: Pierangelo Masarati Date: Sat, 5 Aug 2006 15:51:13 +0000 (+0000) Subject: process callbacks first; they are supposed to remove modifications they successfully... X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b1faecd35cf4106eed96dea74e642c8c4570364c;p=openldap process callbacks first; they are supposed to remove modifications they successfully handled, so that regular modify function can complain if any unhandled modification remains --- diff --git a/servers/slapd/back-monitor/entry.c b/servers/slapd/back-monitor/entry.c index a7b83d489f..3a2377489b 100644 --- a/servers/slapd/back-monitor/entry.c +++ b/servers/slapd/back-monitor/entry.c @@ -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; }