]> git.sur5r.net Git - openldap/commitdiff
Reenable pre-result plugins, these were supported in OpenLDAP 2.2
authorLuke Howard <lukeh@openldap.org>
Tue, 19 Jul 2005 15:39:25 +0000 (15:39 +0000)
committerLuke Howard <lukeh@openldap.org>
Tue, 19 Jul 2005 15:39:25 +0000 (15:39 +0000)
Pre-entry and pre-referral plugins will be enabled after testing

servers/slapd/result.c

index 8a624c9ec48fb97841924d7e4e4518b8601a9855..37678b64ecf5d35bbc55de4f9f8240e312e7ee0c 100644 (file)
@@ -1719,27 +1719,23 @@ static int call_pre_result_plugins( Operation *op, SlapReply *rs )
                return 0;
        }
 
-#define pb op->o_pb
+       slapi_int_pblock_set_operation( op->o_pb, op );
+       slapi_pblock_set( op->o_pb, SLAPI_RESCONTROLS, (void *)rs->sr_ctrls );
+       slapi_pblock_set( op->o_pb, SLAPI_RESULT_CODE, (void *)rs->sr_err );
+       slapi_pblock_set( op->o_pb, SLAPI_RESULT_TEXT, (void *)rs->sr_text );
+       slapi_pblock_set( op->o_pb, SLAPI_RESULT_MATCHED, (void *)rs->sr_matched );
 
-       slapi_int_pblock_set_operation( pb, op );
-       slapi_pblock_set( pb, SLAPI_RESCONTROLS, (void *)rs->sr_ctrls );
-       slapi_pblock_set( pb, SLAPI_RESULT_CODE, (void *)rs->sr_err );
-       slapi_pblock_set( pb, SLAPI_RESULT_TEXT, (void *)rs->sr_text );
-       slapi_pblock_set( pb, SLAPI_RESULT_MATCHED, (void *)rs->sr_matched );
-
-       rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_RESULT_FN, pb );
+       rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_RESULT_FN, op->o_pb );
        if ( rc < 0 ) {
                return rc;
        }
 
-       slapi_pblock_get( pb, SLAPI_RESCONTROLS, (void **)&rs->sr_ctrls );
-       slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
-       slapi_pblock_get( pb, SLAPI_RESULT_TEXT, (void **)&rs->sr_text );
-       slapi_pblock_get( pb, SLAPI_RESULT_MATCHED, (void **)&rs->sr_matched );
-
-       slapi_pblock_set( pb, SLAPI_RESCONTROLS, NULL );
+       slapi_pblock_get( op->o_pb, SLAPI_RESCONTROLS, (void **)&rs->sr_ctrls );
+       slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
+       slapi_pblock_get( op->o_pb, SLAPI_RESULT_TEXT, (void **)&rs->sr_text );
+       slapi_pblock_get( op->o_pb, SLAPI_RESULT_MATCHED, (void **)&rs->sr_matched );
 
-#undef pb
+       slapi_pblock_set( op->o_pb, SLAPI_RESCONTROLS, NULL );
 
        return rc;
 }