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

Re: controls and dynamic support

Luke Howard wrote:

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).

SLAPI plugins (and perhaps OpenLDAP ones?) can register controls

Yes, that was my point. I was talking about an array whose size is set equal to the number of currently registered controls, keeping in mind that controls can be registered dynamically. But the code I committed to HEAD just uses a constant size (SLAP_MAX_CIDS) which I've arbitrarily set at 32 for now. For reference, there are 15 already hardcoded in slapd/controls.c, and the password policy overlay registers one as well.

Code that creates dummy Operation structs (such as in sasl.c/saslauthz.c) might need updating to create a valid struct if we went with the purely dynamic approach I described before, so sticking to a constant made the patch simpler.

 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support