[Date Prev][Date Next]
Re: ITS#7239: testbed
> On Thu, 19 Apr 2012 06:16:16 GMT, email@example.com 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 don't think it's something that can be done automatically. Careful code
review and testing would be required.
> 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.
> Anyway, here's me trying agin again:-)
Sort of recall it. Well, it looks pretty invasive, indeed. The two
things should be kept separate. No preference about the order in which
the two changes should be applied. I'm in no hurry to work at internal
ops (mostly because I have scarce time for it and I'm worried about
possible unexpected showstoppers).
Maybe, if all calls for internal operations are wrapped by a macro, then
ITS#6758 SlapReply cleanup could be performed just from within that macro;
calls that are not judged internal would need to be explicitly wrapped,