Author: rhafer Date: Mon Aug 11 20:17:12 2008 New Revision: 49961 URL: http://svn.opensuse.org/viewcvs/yast?rev=49961&view=rev Log: remove LDAP Attribute if cachesizes or checkpoints are set to 0 Modified: trunk/ldap-server/src/lib/slapd-config.cpp Modified: trunk/ldap-server/src/lib/slapd-config.cpp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/lib/slapd-config.cpp?rev=49961&r1=49960&r2=49961&view=diff ============================================================================== --- trunk/ldap-server/src/lib/slapd-config.cpp (original) +++ trunk/ldap-server/src/lib/slapd-config.cpp Mon Aug 11 20:17:12 2008 @@ -258,7 +258,14 @@ void OlcBdbDatabase::setEntryCache( int cachesize ) { - this->setIntValue( "olcDbCachesize", cachesize ); + if (! cachesize ) + { + this->setStringValue( "olcDbCachesize", "" ); + } + else + { + this->setIntValue( "olcDbCachesize", cachesize ); + } } int OlcBdbDatabase::getIdlCache() const @@ -268,14 +275,28 @@ void OlcBdbDatabase::setIdlCache( int cachesize ) { - this->setIntValue( "olcDbIdlCachesize", cachesize ); + if (! cachesize ) + { + this->setStringValue( "olcDbIdlCachesize", "" ); + } + else + { + this->setIntValue( "olcDbIdlCachesize", cachesize ); + } } void OlcBdbDatabase::setCheckPoint( int kbytes, int min ) { - std::ostringstream oStr; - oStr << kbytes << " " << min; - this->setStringValue( "olcDbCheckpoint", oStr.str() ); + if ( !kbytes && !min ) + { + this->setStringValue( "olcDbCheckpoint", "" ); + } + else + { + std::ostringstream oStr; + oStr << kbytes << " " << min; + this->setStringValue( "olcDbCheckpoint", oStr.str() ); + } } void OlcBdbDatabase::getCheckPoint( int& kbytes, int& min) const -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org