|
@@ -93,7 +93,7 @@ LDAP* LdapUtils::LdapInit(const char* protocol, const char* host, int port, int
|
|
|
int rc = LDAP_INIT(&ld, uri.str());
|
|
|
if(rc != LDAP_SUCCESS)
|
|
|
{
|
|
|
- throw MakeStringException(-1, "ldap_initialize(%s,%d) error %s", host, port, ldap_err2string(LdapGetLastError()));
|
|
|
+ throw MakeStringException(-1, "ldap_initialize(%s,%d) error %s", host, port, ldap_err2string(rc));
|
|
|
}
|
|
|
#endif
|
|
|
}
|