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

Re: cleanup callback and entry free in slap_send_search_entry()

Pierangelo Masarati wrote:

My hack doesn't work because the entry's DN has been rewritten at the time
be_operations() is called :(  There could be a fix: bdb_cache_children
could try to use the e_id to do a bdb_id2entry_get and collect a new
instance of the original entry, but I got in trouble because I'm not
familiar enugh with bdb internals.  Otherwise, we could use a double
sr_entry field in SlapReply, one for the actual (rewritten) entry, to be
returned, and one for the original entry, to be used for intermediate
operations.  This sounds a bit involved, but at least it's not a hack.

Hm. back-hdb already uses the e_id field, so there's no issue there.

For back-bdb, here's another hack - you're copying the e_private from the original entry already, and it contains a backpointer to the original entry. We could have bdb_dn2id_children() use the DN from the original entry, by referencing
instead of using the passed-in entry's name.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support