]> git.sur5r.net Git - openldap/commitdiff
ITS#8752 accesslog: partially revert 3bb8b737ed8e444c6771c1465574eb6cf5b7f19a
authorHoward Chu <hyc@openldap.org>
Wed, 21 Feb 2018 19:48:02 +0000 (19:48 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 21 Feb 2018 19:48:02 +0000 (19:48 +0000)
servers/slapd/overlays/accesslog.c

index 6b9c729c5ed363167d8bed3dab0cc1a6e58fdcfc..e7df2bbdee1b199747b5fcf74d6b82f759a59bf4 100644 (file)
@@ -1990,11 +1990,11 @@ accesslog_op_mod( Operation *op, SlapReply *rs )
        }
                        
        if ( doit ) {
-               slap_callback *cb = op->o_tmpcalloc( 1, sizeof( slap_callback ), op->o_tmpmemctx );
+               slap_callback *cb = op->o_tmpcalloc( 1, sizeof( slap_callback ), op->o_tmpmemctx ), *cb2;
                cb->sc_cleanup = accesslog_mod_cleanup;
                cb->sc_private = on;
-               cb->sc_next = op->o_callback;
-               op->o_callback = cb;
+               for ( cb2 = op->o_callback; cb2->sc_next; cb2 = cb2->sc_next );
+               cb2->sc_next = cb;
 
 #ifdef RMUTEX_DEBUG
                Debug( LDAP_DEBUG_SYNC,