summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-30 10:18:52 -0500
committerSimo Sorce <idra@samba.org>2009-01-30 10:18:52 -0500
commit1f2b5ea97c7957f4f49fdea67960e7c08888e505 (patch)
tree71f71084344d64cb6dbcb6635f1d922f2889783c /source4/lib/ldb
parentd93634b7dd753109a5a3621ea7ab610acba8cb65 (diff)
downloadsamba-1f2b5ea97c7957f4f49fdea67960e7c08888e505.tar.gz
samba-1f2b5ea97c7957f4f49fdea67960e7c08888e505.tar.bz2
samba-1f2b5ea97c7957f4f49fdea67960e7c08888e505.zip
Add helper function to get a module name, may be useful for debugging.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c5
-rw-r--r--source4/lib/ldb/include/ldb_module.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 03d1e6ebe2..99a47767e1 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -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;
diff --git a/source4/lib/ldb/include/ldb_module.h b/source4/lib/ldb/include/ldb_module.h
index 8742b1058c..4e1019184d 100644
--- a/source4/lib/ldb/include/ldb_module.h
+++ b/source4/lib/ldb/include/ldb_module.h
@@ -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);