Howard Chu wrote:
Yes, I saw that. I ignored it because I figured only a single instance of rwm can be active at a time. I guess this isn't quite true; if rwm is configured above the glue overlay, and also configured on individual subordinate databases, there would be a clash. I'll change this to just use a tmpalloc'd callback.
That was what my initial idea wanted to avoid, because it seemed to me a waste of resources to malloc something fixed size that needs to be used all times the same, so using the thread keys seemed to me the most obvious solution. Then the multiple instance per thread execution became possible, but I was too lazy to change it. Maybe there's a better approach, but I couldn't figure it out. All in all, malloc'ing a callback is done all times in bind, right now (maybe it could be eliminated there as well... what's more expensive: a thread key lookup or a malloc on the slab?)
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.n.c. Via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ------------------------------------------ Office: +39.02.23998309 Mobile: +39.333.4963172 Email: pierangelo.masarati@sys-net.it ------------------------------------------