svn commit: samba r16908 - in branches/SAMBA_4_0/source/lib/ldb/common: .

abartlet at samba.org abartlet at samba.org
Mon Jul 10 08:31:47 GMT 2006


Author: abartlet
Date: 2006-07-10 08:31:47 +0000 (Mon, 10 Jul 2006)
New Revision: 16908

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16908

Log:
Set an error string if we can't find a backend for an operation.

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	2006-07-10 08:00:06 UTC (rev 16907)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c	2006-07-10 08:31:47 UTC (rev 16908)
@@ -338,9 +338,13 @@
   when ldb is extended
 */
 #define FIND_OP(module, op) do { \
+	struct ldb_context *ldb = module->ldb; \
 	module = module->next; \
 	while (module && module->ops->op == NULL) module = module->next; \
-	if (module == NULL) return LDB_ERR_OPERATIONS_ERROR; \
+	if (module == NULL) { \
+		ldb_set_errstring(ldb, talloc_strdup(ldb, "Unable to find backend operation for " #op )); \
+		return LDB_ERR_OPERATIONS_ERROR;	\
+	}						\
 } while (0)
 
 



More information about the samba-cvs mailing list