summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-30 18:45:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:26 -0500
commitc4e622f4b753bfb25198a2be74bbcad6398d2b19 (patch)
treefbc6849da52872e3ce7091aeec57de6c3b13576d /source4
parentad1cbc52cccf123c9f97edd4ff30df29e4677499 (diff)
downloadsamba-c4e622f4b753bfb25198a2be74bbcad6398d2b19.tar.gz
samba-c4e622f4b753bfb25198a2be74bbcad6398d2b19.tar.bz2
samba-c4e622f4b753bfb25198a2be74bbcad6398d2b19.zip
r15362: Consider anything non-zero a failure, bnio not just -1
(This used to be commit c3626548f74ca4c930b9d8a82de9c79f6f5e5903)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/db_wrap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c
index 7a61485123..bed88b3bc6 100644
--- a/source4/lib/db_wrap.c
+++ b/source4/lib/db_wrap.c
@@ -32,6 +32,7 @@
#include "lib/events/events.h"
#include "lib/tdb/include/tdb.h"
#include "lib/ldb/include/ldb.h"
+#include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb/samba/ldif_handlers.h"
#include "db_wrap.h"
@@ -123,7 +124,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
}
ret = ldb_connect(ldb, real_url, flags, options);
- if (ret == -1) {
+ if (ret != LDB_SUCCESS) {
talloc_free(ldb);
return NULL;
}