diff options
author | Simo Sorce <idra@samba.org> | 2005-09-18 18:49:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:16 -0500 |
commit | 16aff2a184f7fab64d718b356056070e305e99e9 (patch) | |
tree | c1c3dd59cb0e9c54c0ce95bf9165d353206ebd8e /source4/lib/ldb/common/ldb_modules.c | |
parent | 46a8d809376cab59c579c654b0de5105727a9585 (diff) | |
download | samba-16aff2a184f7fab64d718b356056070e305e99e9.tar.gz samba-16aff2a184f7fab64d718b356056070e305e99e9.tar.bz2 samba-16aff2a184f7fab64d718b356056070e305e99e9.zip |
r10305: start implementing better error handling
changed the prioivate modules API
error string are now not spread over all
modules but are kept in a single place.
This allows a better control of memory
and error reporting.
(This used to be commit 3fc676ac1d6f59d08bedbbd9377986154cf84ce4)
Diffstat (limited to 'source4/lib/ldb/common/ldb_modules.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 29bc8264e9..e1f5b83083 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -322,11 +322,12 @@ int ldb_next_end_trans(struct ldb_module *module, int status) return module->next->ops->end_transaction(module->next, status); } -const char *ldb_next_errstring(struct ldb_module *module) +void ldb_set_errstring(struct ldb_module *module, char *err_string) { - if (!module->next) { - return NULL; + if (module->ldb->err_string) { + talloc_free(module->ldb->err_string); } - return module->next->ops->errstring(module->next); + + module->ldb->err_string = err_string; } |