[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Run-time registered controls

>> So, yes, we do need a way for overlays to augment the
>> controls supported by a database instance.
> Looking at backover.c code, it appears that overlays at bi_db_open are
> passed the __real__ backend structure; so my proposal to have a "real"
> be_controls array in the backend structure which is a copy of the
> bi_controls + overlays and in general run-time modules augmentation looks
> feasible.  Unless there's a better way, I'd start code it (so I can test
> my overlay :)

OK, I've implemented this, and now seems to work (prior to your revert :).
 I note an even "smarter" implementation could be done by setting
be_controls = be->bd_info->bi_controls and duplicating it only when a
control needs be added.

Now I have a different problem, when an overlay that implements a control
is used as global, because backend_check_restrictions() is called with the
backend that's actually serving the operation, which doesn't list the
control.  A workaround is to add the control OID to all databases,
although there might be side effects.  I'll see.



Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497