mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-11 06:43:09 -05:00
Better fix - avoid allocating callback for non-logged mod ops
This commit is contained in:
parent
62341e5b86
commit
a8ffb63331
1 changed files with 9 additions and 2 deletions
|
|
@ -1377,6 +1377,11 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||
|
||||
if ( lo->mask & LOG_OP_WRITES ) {
|
||||
slap_callback *cb;
|
||||
|
||||
/* These internal ops are not logged */
|
||||
if ( op->o_dont_replicate && op->orm_no_opattrs )
|
||||
return SLAP_CB_CONTINUE;
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &li->li_log_mutex );
|
||||
old = li->li_old;
|
||||
li->li_old = NULL;
|
||||
|
|
@ -1388,8 +1393,6 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||
}
|
||||
}
|
||||
ldap_pvt_thread_rmutex_unlock( &li->li_op_rmutex, op->o_tid );
|
||||
if ( op->o_dont_replicate && op->orm_no_opattrs )
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ( li->li_success && rs->sr_err != LDAP_SUCCESS )
|
||||
|
|
@ -1760,6 +1763,10 @@ accesslog_op_mod( Operation *op, SlapReply *rs )
|
|||
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
|
||||
log_info *li = on->on_bi.bi_private;
|
||||
|
||||
/* These internal ops are not logged */
|
||||
if ( op->o_dont_replicate && op->orm_no_opattrs )
|
||||
return SLAP_CB_CONTINUE;
|
||||
|
||||
if ( li->li_ops & LOG_OP_WRITES ) {
|
||||
slap_callback *cb = op->o_tmpalloc( sizeof( slap_callback ), op->o_tmpmemctx ), *cb2;
|
||||
cb->sc_cleanup = accesslog_mod_cleanup;
|
||||
|
|
|
|||
Loading…
Reference in a new issue