]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPModDNRequest.cpp
Merge remote branch 'origin/mdb.master'
[openldap] / contrib / ldapc++ / src / LDAPModDNRequest.cpp
index 44f4aaadb7a9c8cc51226514f96fb6b6c1879ee2..f9a16fe51cd1e385e0878551c57fb94d3551febe 100644 (file)
@@ -1,5 +1,6 @@
+// $OpenLDAP$
 /*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -44,9 +45,6 @@ LDAPModDNRequest::LDAPModDNRequest(const string& dn, const string& newRDN,
 
 LDAPModDNRequest::~LDAPModDNRequest(){
     DEBUG(LDAP_DEBUG_DESTROY, "LDAPModDNRequest::~LDAPModDNRequest()" << endl);
-    // flush entries from the cache.
-    m_connection->uncache_entry(m_dn);
-    m_connection->uncache_entry(m_newRDN);
 }
 
 LDAPMessageQueue* LDAPModDNRequest::sendRequest(){
@@ -60,8 +58,8 @@ LDAPMessageQueue* LDAPModDNRequest::sendRequest(){
     LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray();
     int err=ldap_rename(m_connection->getSessionHandle(),m_dn.c_str(),newRDN,
             newParentDN,m_deleteOld ? 1 : 0, tmpSrvCtrls, tmpClCtrls,&msg_id);
-    ldap_controls_free(tmpSrvCtrls);
-    ldap_controls_free(tmpClCtrls);
+    LDAPControlSet::freeLDAPControlArray(tmpSrvCtrls);
+    LDAPControlSet::freeLDAPControlArray(tmpClCtrls);
     if(err!=LDAP_SUCCESS){
         throw LDAPException(err);
     }else{