From 98252925e35b48fc3f83d2bd50427993cd19a5d4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 16 Feb 2010 15:17:53 +0000 Subject: [PATCH] fixed start_tls() error handling --- contrib/ldapc++/src/LDAPAsynConnection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/ldapc++/src/LDAPAsynConnection.cpp b/contrib/ldapc++/src/LDAPAsynConnection.cpp index 13fc78d61b..65e7a09cf1 100644 --- a/contrib/ldapc++/src/LDAPAsynConnection.cpp +++ b/contrib/ldapc++/src/LDAPAsynConnection.cpp @@ -81,8 +81,9 @@ void LDAPAsynConnection::initialize(const std::string& uri){ } void LDAPAsynConnection::start_tls(){ - if( ldap_start_tls_s( cur_session, NULL, NULL ) != LDAP_SUCCESS ) { - throw LDAPException(this); + int ret = ldap_start_tls_s( cur_session, NULL, NULL ); + if( ret != LDAP_SUCCESS ) { + throw LDAPException(ret); } } -- 2.39.5