From c4e622f4b753bfb25198a2be74bbcad6398d2b19 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 30 Apr 2006 18:45:43 +0000 Subject: r15362: Consider anything non-zero a failure, bnio not just -1 (This used to be commit c3626548f74ca4c930b9d8a82de9c79f6f5e5903) --- source4/lib/db_wrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit