From 75a77db5b27f4296357987ad97cecda5668d2c3c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 23 May 2004 08:16:38 +0000 Subject: [PATCH] fixed TLS error handling --- lam-0.4/HISTORY | 3 ++- lam-0.4/lib/ldap.inc | 2 +- lam/lib/ldap.inc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lam-0.4/HISTORY b/lam-0.4/HISTORY index 02c40851..7631bb4e 100644 --- a/lam-0.4/HISTORY +++ b/lam-0.4/HISTORY @@ -1,9 +1,10 @@ -??? 0.4.6 +26.05.2004 0.4.6 - fixed bugs: password hashes were not disabled correctly street was copied to postal code on modify (938502) underscore was not allowed for host names (934445) deleting postal address or facsimile number failed (948616) + TLS error handling (958497) smaller fixes on personal settings page diff --git a/lam-0.4/lib/ldap.inc b/lam-0.4/lib/ldap.inc index 16c340da..f440f572 100644 --- a/lam-0.4/lib/ldap.inc +++ b/lam-0.4/lib/ldap.inc @@ -266,7 +266,7 @@ class Ldap{ if (function_exists('ldap_start_tls')) { @ldap_start_tls($this->server); // connect without TLS if it failed - if (ldap_errno($this->server) > 0) { + if (ldap_errno($this->server) != 0) { @ldap_close($this->server); $this->server = @ldap_connect($this->conf->get_ServerURL()); ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3); diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 16c340da..f440f572 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -266,7 +266,7 @@ class Ldap{ if (function_exists('ldap_start_tls')) { @ldap_start_tls($this->server); // connect without TLS if it failed - if (ldap_errno($this->server) > 0) { + if (ldap_errno($this->server) != 0) { @ldap_close($this->server); $this->server = @ldap_connect($this->conf->get_ServerURL()); ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3);