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

Re: When must slap_callback.sc_writewait be set?



Hallvard Breien Furuseth wrote:
Howard Chu wrote:
Hallvard Breien Furuseth wrote:
When is it safe to leave sc_writewait uninitialized?  The field
seems to have emerged in the middle of RE24, and I don't see any
flags which say it should/should not be used.

Where would such flags reside?

slap_callback.sc_flags.  If it existed it could get a "the sc_writewait
field is valid" bit.  Then the struct could have been safely extended
without breaking other modules - provided they were recompiled, anyway.

Since not setting it crashed back-relay in ITS#8428, does that
mean everything which creates a slap_callback should set it?

Yes.

Then most callback code in slapd must be fixed.  Now I don't understand
why slapd still works as well as it does...

Because most callback users do a default initialization, e.g.
slap_callback cb = { xx };

back-relay was odd in this respect.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/