summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-08 00:58:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:58 -0500
commit6664ac88860d3e6d21ce6fdf06d2ff927496a31a (patch)
tree8bd5c8a5cbbd6a74fdd76b43b1de80fc67f165fe /source4/lib/ldb
parentc79f37fa1aa0b7414d184ddb14f2db168cbd2568 (diff)
downloadsamba-6664ac88860d3e6d21ce6fdf06d2ff927496a31a.tar.gz
samba-6664ac88860d3e6d21ce6fdf06d2ff927496a31a.tar.bz2
samba-6664ac88860d3e6d21ce6fdf06d2ff927496a31a.zip
r16085: Set the error string if we fail to find a valid op to execute. Helps
in chasing down bugs :-) Andrew Bartlett (This used to be commit 9ede8edbaf1731f32814917439326f49b5f9f3ef)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index ff5d2a2e8b..857c995a0e 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -189,9 +189,13 @@ void ldb_reset_err_string(struct ldb_context *ldb)
}
#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)
/*