On Thu, 19 Apr 2012 06:16:16 GMT, masarati@aero.polimi.it wrote:
A definitive and simple solution, although invasive, would be to:
add a o_internal flag to the Operation structure
add a macro BE_INTERNAL(op, rs, op_type) like
#define BE_INTERNAL(op, rs, op_type, rcp) \ { int save_o_internal = op->o_internal; op->o_internal = 1; *rcp = (&op->o_bd->bi_info->bi_op_bind)[op_type]( op, rs ); op->o_internal = save_o_internal; }
I imagine connection.c:operation_fake_init() should set op->o_internal and any callers which disagree should unset it
fix all calls to internal operations (brrr....)
I do have a patch+Perl script which wraps all operation(op, rs) calls, but it doesn't know which ops are "internal".
I want it for the SlapReply cleanup (ITS#6758). The only way to make a hunt for dirty SlapReplies feasible. I suggested it when I was doing the cleanup, but IIRC nobody replied - except there were related complaints that my cleanup was too invasive.
http://www.openldap.org/lists/openldap-devel/201101/msg00039.html http://folk.uio.no/hbf/OpenLDAP/wrap_slap_ops.txt
Anyway, here's me trying agin again:-)