diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-11-15 12:34:40 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2011-11-17 05:24:46 +0100 |
commit | 3a0f7b89d551a739d886396d320309f8e7d04372 (patch) | |
tree | d9927da3791676be75dba56f848234d5f01837c0 /lib/ldb/include | |
parent | 3bb5af52448fe50f18d76c180d96658b36c78515 (diff) | |
download | samba-3a0f7b89d551a739d886396d320309f8e7d04372.tar.gz samba-3a0f7b89d551a739d886396d320309f8e7d04372.tar.bz2 samba-3a0f7b89d551a739d886396d320309f8e7d04372.zip |
ldb: Add handy macros for reporting error inside ldb module
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Nov 17 05:24:46 CET 2011 on sn-devel-104
Diffstat (limited to 'lib/ldb/include')
-rw-r--r-- | lib/ldb/include/ldb_module.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h index 2acd8f364b..4ecddc4ab1 100644 --- a/lib/ldb/include/ldb_module.h +++ b/lib/ldb/include/ldb_module.h @@ -85,10 +85,12 @@ void ldb_debug_add(struct ldb_context *ldb, const char *fmt, ...) PRINTF_ATTRIBU void ldb_debug_end(struct ldb_context *ldb, enum ldb_debug_level level); #define ldb_error(ldb, ecode, reason) ldb_error_at(ldb, ecode, reason, __FILE__, __LINE__) +#define ldb_module_error(module, ecode, reason) ldb_error_at(ldb_module_get_ctx(module), ecode, reason, __FILE__, __LINE__) #define ldb_oom(ldb) ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR, "ldb out of memory") #define ldb_module_oom(module) ldb_oom(ldb_module_get_ctx(module)) #define ldb_operr(ldb) ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR, "operations error") +#define ldb_module_operr(module) ldb_error(ldb_module_get_ctx(module), LDB_ERR_OPERATIONS_ERROR, "operations error") /* The following definitions come from lib/ldb/common/ldb.c */ |