mirror of
https://github.com/samba-team/samba.git
synced 2025-11-27 08:23:49 +03:00
r5585: LDB interfaces change:
changes: - ldb_wrap disappears from code and become a private structure of db_wrap.c thanks to our move to talloc in ldb code, we do not need to expose it anymore - removal of ldb_close() function form the code thanks to our move to talloc in ldb code, we do not need it anymore use talloc_free() to close and free an ldb database - some minor updates to ldb modules code to cope with the change and fix some bugs I found out during the process
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
e77a070c84
commit
d58be9e74b
@@ -36,12 +36,6 @@
|
||||
#include "ldb/include/ldb.h"
|
||||
#include "ldb/include/ldb_private.h"
|
||||
|
||||
/* close */
|
||||
static int skel_close(struct ldb_module *module)
|
||||
{
|
||||
return ldb_next_close(module);
|
||||
}
|
||||
|
||||
/* search */
|
||||
static int skel_search(struct ldb_module *module, const char *base,
|
||||
enum ldb_scope scope, const char *expression,
|
||||
@@ -98,9 +92,15 @@ static const char *skel_errstring(struct ldb_module *module)
|
||||
return ldb_next_errstring(module);
|
||||
}
|
||||
|
||||
static int skel_destructor(void *module_ctx)
|
||||
{
|
||||
struct ldb_module *ctx = module_ctx;
|
||||
/* put your clean-up functions here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct ldb_module_ops skel_ops = {
|
||||
"skel",
|
||||
skel_close,
|
||||
skel_search,
|
||||
skel_search_free,
|
||||
skel_add_record,
|
||||
@@ -129,5 +129,7 @@ struct ldb_module *skel_plugin_init(struct ldb_context *ldb, const char *options
|
||||
ctx->private_data = NULL;
|
||||
ctx->ops = &skel_ops;
|
||||
|
||||
talloc_set_destructor (ctx, skel_destructor);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user