this->setConstraints(cons);
}
-LDAPAsynConnection::~LDAPAsynConnection(){}
+LDAPAsynConnection::~LDAPAsynConnection(){
+ unbind();
+ delete m_constr;
+}
void LDAPAsynConnection::init(const string& hostname, int port){
DEBUG(LDAP_DEBUG_TRACE,"LDAPAsynConnection::init" << endl);
" hostname:" << hostname << endl
<< " port:" << port << endl);
+ unbind();
+
m_uri.setScheme("ldap");
m_uri.setHost(hostname);
m_uri.setPort(port);
}
void LDAPAsynConnection::initialize(const std::string& uri){
+ unbind();
+
m_uri.setURLString(uri);
int ret = ldap_initialize(&cur_session, m_uri.getURLString().c_str());
if ( ret != LDAP_SUCCESS ) {
void LDAPAsynConnection::setConstraints(LDAPConstraints *cons){
DEBUG(LDAP_DEBUG_TRACE,"LDAPAsynConnection::setConstraints()" << endl);
+ delete m_constr;
m_constr=cons;
}