]> git.sur5r.net Git - openldap/commitdiff
ITS#7641 don't muck with controls if slapi doesn't use them
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>
Fri, 26 Jul 2013 20:15:58 +0000 (13:15 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 26 Jul 2013 20:15:58 +0000 (13:15 -0700)
servers/slapd/slapi/slapi_overlay.c

index ad23153e22ce56376d4f95ecf7681b36b0e16c94..b4fb258f6c00bb7a148cb734012c530512654498 100644 (file)
@@ -454,11 +454,11 @@ slapi_over_merge_controls( Operation *op, SlapReply *rs )
        n_slapi_ctrls = slapi_int_count_controls( slapi_ctrls );
        n_rs_ctrls = slapi_int_count_controls( rs->sr_ctrls );
 
-       slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
-
        if ( n_slapi_ctrls == 0 )
                return LDAP_SUCCESS; /* no SLAPI controls */
 
+       slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
+
        ctrls = (LDAPControl **) op->o_tmpalloc(
                ( n_slapi_ctrls + n_rs_ctrls + 1 ) * sizeof(LDAPControl *),
                op->o_tmpmemctx );