svn commit: samba r26301 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
abartlet at samba.org
abartlet at samba.org
Wed Dec 5 01:25:10 GMT 2007
Author: abartlet
Date: 2007-12-05 01:25:07 +0000 (Wed, 05 Dec 2007)
New Revision: 26301
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26301
Log:
Collapose ldb_next_init() into being a caller of ldb_init_module_chain
and therefore further improve debug output.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-12-05 01:20:53 UTC (rev 26300)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-12-05 01:25:07 UTC (rev 26301)
@@ -279,10 +279,15 @@
while (module && module->ops->init_context == NULL)
module = module->next;
- if (module && module->ops->init_context &&
- module->ops->init_context(module) != LDB_SUCCESS) {
- ldb_debug(ldb, LDB_DEBUG_FATAL, "module %s initialization failed\n", module->ops->name);
- return LDB_ERR_OPERATIONS_ERROR;
+ /* init is different in that it is not an error if modules
+ * do not require initialization */
+
+ if (module) {
+ int ret = module->ops->init_context(module);
+ if (ret != LDB_SUCCESS) {
+ ldb_debug(ldb, LDB_DEBUG_FATAL, "module %s initialization failed\n", module->ops->name);
+ return ret;
+ }
}
return LDB_SUCCESS;
@@ -434,18 +439,9 @@
int ldb_next_init(struct ldb_module *module)
{
- /* init is different in that it is not an error if modules
- * do not require initialization */
-
module = module->next;
- while (module && module->ops->init_context == NULL)
- module = module->next;
-
- if (module == NULL)
- return LDB_SUCCESS;
-
- return module->ops->init_context(module);
+ return ldb_init_module_chain(module->ldb, module);
}
int ldb_next_start_trans(struct ldb_module *module)
More information about the samba-cvs
mailing list