]> git.sur5r.net Git - openldap/commitdiff
fixed start_tls() error handling
authorRalf Haferkamp <ralf@openldap.org>
Tue, 16 Feb 2010 15:17:53 +0000 (15:17 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Tue, 16 Feb 2010 15:17:53 +0000 (15:17 +0000)
contrib/ldapc++/src/LDAPAsynConnection.cpp

index 13fc78d61b31d4b820cff1d5f216f30f6c6e9641..65e7a09cf1aee400d07dd4b505af362f9fcaf211 100644 (file)
@@ -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);
     }
 }