return(rc);
}
-static int lderrno(util_ldap_connection_t *ldc)
+static int uldap_ld_errno(util_ldap_connection_t *ldc)
{
int ldaprc;
#ifdef LDAP_OPT_ERROR_NUMBER
#endif
return LDAP_OTHER;
}
+
/*
* Replacement function for ldap_simple_bind_s() with a timeout.
* To do this in a portable way, we have to use ldap_simple_bind() and
int msgid = ldap_simple_bind(ldc->ldap, binddn, bindpw);
if (msgid == -1) {
ldc->reason = "LDAP: ldap_simple_bind() failed";
- return lderrno(ldc);
+ return uldap_ld_errno(ldc);
}
rc = ldap_result(ldc->ldap, msgid, 0, timeout, &result);
if (rc == -1) {
ldc->reason = "LDAP: ldap_simple_bind() result retrieval failed";
/* -1 is LDAP_SERVER_DOWN in openldap, use something else */
- return lderrno(ldc);
+ return uldap_ld_errno(ldc);
}
else if (rc == 0) {
ldc->reason = "LDAP: ldap_simple_bind() timed out";
} else if (ldap_parse_result(ldc->ldap, result, &rc, NULL, NULL, NULL,
NULL, 1) == -1) {
ldc->reason = "LDAP: ldap_simple_bind() parse result failed";
- return lderrno(ldc);
+ return uldap_ld_errno(ldc);
}
return rc;
}