[PATCH] Make tdb use ldb's log functions

Andrew Bartlett abartlet at samba.org
Sun Jul 9 23:57:13 GMT 2006


On Mon, 2006-07-03 at 09:51 +0200, Stefan (metze) Metzmacher wrote:

> I think we should use tdb_set_logging_function() and
> tdb_get_logging_private() as better names.
> 
> and maybe pass just one argument to the set function
> as well to tdb_open_ex().
> 
> struct tdb_logging_context {
> 	tdb_log_func log_fn;
> 	void *log_private;
> };
> void tdb_set_logging_function(struct tdb_context *tdb,
> 			      struct tdb_logging_context *log)
> ...

This sounds reasonable, particularly as tdb_open_ex has too many
arguments already.  Do you think that this *log should be a pointer tdb
keeps (ie, caller to malloc), or just one it copies the contents of?  

If tdb keeps it, who should free() it?

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060710/b74c47c6/attachment.bin


More information about the samba-technical mailing list