summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-23 17:23:44 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-25 11:24:54 +0100
commit1ea460b0b0dc4ee8a14c764e81f368d4f7e9ff45 (patch)
tree28ac468ec40edf0a8b9d5fc3981ac380915b066b /source4/lib/ldb/ldb_ldap
parent54bd30f70632b8fcbe164133d2479092b7262a29 (diff)
downloadsamba-1ea460b0b0dc4ee8a14c764e81f368d4f7e9ff45.tar.gz
samba-1ea460b0b0dc4ee8a14c764e81f368d4f7e9ff45.tar.bz2
samba-1ea460b0b0dc4ee8a14c764e81f368d4f7e9ff45.zip
ldb:backend "connect" functions - convert result values to LDB constants
I think this is better since "ldb_backend_connect" and "ldb_connect" which propagate those values should return only LDB constants. Therefore a conversion (especially for "-1") would be needed.
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 3775738101..0d75491e91 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -860,7 +860,7 @@ static int lldb_connect(struct ldb_context *ldb,
int ret;
module = ldb_module_new(ldb, ldb, "ldb_ldap backend", &lldb_ops);
- if (!module) return -1;
+ if (!module) return LDB_ERR_OPERATIONS_ERROR;
lldb = talloc_zero(module, struct lldb_private);
if (!lldb) {
@@ -886,11 +886,11 @@ static int lldb_connect(struct ldb_context *ldb,
}
*_module = module;
- return 0;
+ return LDB_SUCCESS;
failed:
talloc_free(module);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
const struct ldb_backend_ops ldb_ldap_backend_ops = {