tdb merges (was svn commit r17607)

tridge at samba.org tridge at samba.org
Wed Aug 23 21:23:55 GMT 2006


Jeremy,

 > Looks fine to me also.

just checking, I presuming you're acking the merge of what we do in
Samba4 now (ie. a small change?). 

I also offered an alternative proposal where I attempted to "future
proof" the API so we don't need to go through this again.

hmm, actually, maybe we can keep the current API and still future
proof it? What do you think of the following:

 struct tdb_context *tdb;
 int ret;

 tdb = tdb_init(mem_ctx);
 tdb_set_logging_fn(tdb, log_fn); 
 tdb_set_logging_fn_private(tdb, log_private);
 tdb_set_hash_size(tdb, hash_size);
 tdb_set_hash_func(tdb, hash_fn);

 ret = tdb_attach(tdb, name, tdb_flags, open_flags, mode); 


note that we could then build the existing tdb_open() and
tdb_open_ex() as simple wrappers around the above, so existing code
(and even binaries) would work, but we can also add new features
without disturbing the API.

We can have our cake and eat it too :-)

Cheers, Tridge


More information about the samba-technical mailing list