1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

Add helper function to get a module name, may be useful for debugging.

This commit is contained in:
Simo Sorce 2009-01-30 10:18:52 -05:00
parent d93634b7dd
commit 1f2b5ea97c
2 changed files with 7 additions and 1 deletions

View File

@ -506,6 +506,11 @@ struct ldb_module *ldb_module_new(TALLOC_CTX *memctx,
return module;
}
const char * ldb_module_get_name(struct ldb_module *module)
{
return module->ops->name;
}
struct ldb_context *ldb_module_get_ctx(struct ldb_module *module)
{
return module->ldb;

View File

@ -55,7 +55,7 @@ struct ldb_module_ops {
int (*end_transaction)(struct ldb_module *);
int (*del_transaction)(struct ldb_module *);
int (*sequence_number)(struct ldb_module *, struct ldb_request *);
void *private_data;
void *private_data;
};
@ -110,6 +110,7 @@ struct ldb_module *ldb_module_new(TALLOC_CTX *memctx,
const char *module_name,
const struct ldb_module_ops *ops);
const char * ldb_module_get_name(struct ldb_module *module);
struct ldb_context *ldb_module_get_ctx(struct ldb_module *module);
void *ldb_module_get_private(struct ldb_module *module);
void ldb_module_set_private(struct ldb_module *module, void *private_data);