mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
- extented Referral chasing (loop detection, hop limit, Rebind) - support for Server Controls - fixed many bugs and memory leaks
34 lines
910 B
C++
34 lines
910 B
C++
/*
|
|
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
*/
|
|
|
|
|
|
#include "LDAPModList.h"
|
|
#include "debug.h"
|
|
|
|
LDAPModList::LDAPModList(){
|
|
DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList()" << endl);
|
|
}
|
|
|
|
LDAPModList::LDAPModList(const LDAPModList& ml){
|
|
DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList(&)" << endl);
|
|
m_modList=ml.m_modList;
|
|
}
|
|
|
|
void LDAPModList::addModification(const LDAPModification &mod){
|
|
DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::addModification()" << endl);
|
|
m_modList.push_back(mod);
|
|
}
|
|
|
|
LDAPMod** LDAPModList::toLDAPModArray(){
|
|
DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::toLDAPModArray()" << endl);
|
|
LDAPMod **ret = new LDAPMod*[m_modList.size()+1];
|
|
ret[m_modList.size()]=0;
|
|
ModList::const_iterator i;
|
|
int j=0;
|
|
for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
|
|
ret[j]=i->toLDAPMod();
|
|
}
|
|
return ret;
|
|
}
|