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

abartlet at samba.org abartlet at samba.org
Thu Jun 8 00:58:58 GMT 2006


Author: abartlet
Date: 2006-06-08 00:58:57 +0000 (Thu, 08 Jun 2006)
New Revision: 16085

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

Log:
Set the error string if we fail to find a valid op to execute.  Helps
in chasing down bugs :-)

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c	2006-06-07 22:03:06 UTC (rev 16084)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c	2006-06-08 00:58:57 UTC (rev 16085)
@@ -189,9 +189,13 @@
 }
 
 #define FIRST_OP(ldb, op) do { \
-	module = ldb->modules; \
+	module = ldb->modules;					\
 	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_asprintf(ldb, "unable to find module or backend to handle operation: " #op)); \
+		return LDB_ERR_OPERATIONS_ERROR;			\
+	} \
 } while (0)
 
 /*



More information about the samba-cvs mailing list