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

Re: controls and dynamic support



Howard Chu wrote:

Pierangelo Masarati wrote:

Howard Chu wrote:

I was thinking about how both pagedresults and server-side sorting could be accomplished using overlays, and the idea is simple enough. But one of the more awkward aspects of adding new controls is plugging them into the Operation structure so they can be easily referenced by other code. I recall how OpenSSL handles various OID-based entities - it has its own internal registry and assigns small integers (NIDs) for each one. I think we need a similar mechanism for slapd.

Specifically, the register_supported_control function should return the index of the control in slapd's internal table. The Operation structure should have an array
void **o_controls




.. or void *o_controls[NID_MAX]; ?


I guess that would be OK. Any reason you prefer that over dynamically sizing the array? (I prefer to avoid hard limits, and I don't see a compelling need to limit this one.)

Maybe I was too cryptical; of course, any time a new control gets supported, NID_MAX is pushed to a higher value; that should really read (MAX_DEFINED_NID+1).


p.






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