From bba3f62bdc6158dcb5bc61619df348c64820ede1 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 7 Aug 2005 03:13:57 +0000 Subject: [PATCH] Always restore op->o_callback in SLAPI overlay - was spinning indefinitely --- servers/slapd/slapi/slapi_overlay.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/servers/slapd/slapi/slapi_overlay.c b/servers/slapd/slapi/slapi_overlay.c index 83ba0f9033..9670898f4e 100644 --- a/servers/slapd/slapi/slapi_overlay.c +++ b/servers/slapd/slapi/slapi_overlay.c @@ -676,11 +676,10 @@ slapi_over_extended( Operation *op, SlapReply *rs ) rc = (*callback)( pb ); if ( rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT ) { - slapi_pblock_destroy( pb ); - return rc; + goto cleanup; } else if ( rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) { - slapi_pblock_destroy( pb ); - return SLAP_CB_CONTINUE; + rc = SLAP_CB_CONTINUE; + goto cleanup; } assert( rs->sr_rspoid != NULL ); @@ -694,9 +693,13 @@ slapi_over_extended( Operation *op, SlapReply *rs ) if ( rs->sr_rspdata != NULL ) ber_bvfree( rs->sr_rspdata ); + rc = rs->sr_err; + +cleanup: slapi_pblock_destroy( pb ); + op->o_callback = cb.sc_next; - return rs->sr_err; + return rc; } static int @@ -727,10 +730,11 @@ slapi_over_access_allowed( rc = SLAP_CB_CONTINUE; } - op->o_callback = cb.sc_next; - - if ( !internal_op ) + if ( !internal_op ) { slapi_pblock_destroy( pb ); + } + + op->o_callback = cb.sc_next; return rc; } @@ -807,6 +811,8 @@ slapi_over_acl_group( if ( e != target ) { be_entry_release_r( op, e ); } + + op->o_callback = cb.sc_next; } else { rc = LDAP_NO_SUCH_OBJECT; /* return SLAP_CB_CONTINUE for correctness? */ } -- 2.39.5