summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-09-18 18:49:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:16 -0500
commit16aff2a184f7fab64d718b356056070e305e99e9 (patch)
treec1c3dd59cb0e9c54c0ce95bf9165d353206ebd8e /source4/lib/ldb/tools
parent46a8d809376cab59c579c654b0de5105727a9585 (diff)
downloadsamba-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/tools')
-rw-r--r--source4/lib/ldb/tools/ldbadd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index de6da0eb5b..ba58f782f0 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -34,6 +34,7 @@
#include "includes.h"
#include "ldb/include/ldb.h"
+#include "ldb/include/ldb_errors.h"
#include "ldb/include/ldb_private.h"
#include "ldb/tools/cmdline.h"
@@ -74,7 +75,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
ldif->msg = ldb_msg_canonicalize(ldb, ldif->msg);
ret = ldb_add(ldb, ldif->msg);
- if (ret != 0) {
+ if (ret != LDB_ERR_SUCCESS) {
fprintf(stderr, "ERR: \"%s\" on DN %s\n",
ldb_errstring(ldb), ldb_dn_linearize(ldb, ldif->msg->dn));
failures++;