Author: rhafer Date: Tue Oct 7 17:46:20 2008 New Revision: 51930 URL: http://svn.opensuse.org/viewcvs/yast?rev=51930&view=rev Log: .init must cleanup internal structures (bnc#433089) Modified: trunk/ldap-server/src/agent/SlapdConfigAgent.cc trunk/ldap-server/src/agent/SlapdConfigAgent.h Modified: trunk/ldap-server/src/agent/SlapdConfigAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/agent/SlapdConfigAgent.cc?rev=51930&r1=51929&r2=51930&view=diff ============================================================================== --- trunk/ldap-server/src/agent/SlapdConfigAgent.cc (original) +++ trunk/ldap-server/src/agent/SlapdConfigAgent.cc Tue Oct 7 17:46:20 2008 @@ -195,6 +195,10 @@ } olc = OlcConfig(lc); } + databases.clear(); + schema.clear(); + deleteableSchema.clear(); + globals.reset((OlcGlobalConfig*) 0 ); } else if ( path->component_str(0) == "initFromLdif" ) { @@ -314,7 +318,7 @@ { olc.updateEntry(**j); } - deleteAbleSchema.clear(); + deleteableSchema.clear(); OlcDatabaseList::iterator i; for ( i = databases.begin(); i != databases.end() ; i++ ) { @@ -802,7 +806,7 @@ { YCPList result; std::liststd::string::const_iterator i; - for (i = deleteAbleSchema.begin() ; i != deleteAbleSchema.end(); i++ ) + for (i = deleteableSchema.begin() ; i != deleteableSchema.end(); i++ ) { result.add( YCPString(*i) ); } @@ -1421,7 +1425,7 @@ index--; } std::string cn = *entry.getAttributeByName("cn")->getValues().begin(); - deleteAbleSchema.push_back(cn); + deleteableSchema.push_back(cn); schemaCfg->setIndex( index , true ); schema.push_back( schemaCfg ); } @@ -1524,13 +1528,10 @@ index--; } std::string cn = *entry.getAttributeByName("cn")->getValues().begin(); - deleteAbleSchema.push_back(cn); + deleteableSchema.push_back(cn); schemaCfg->setIndex( index , true ); schema.push_back( schemaCfg ); - //lastError->add( YCPString("summary"), - // YCPString("Error while parsing Schema file") ); - //lastError->add( YCPString("description"), YCPString("") ); return YCPBoolean(true); } else if ( subpath == "remove" ) @@ -1538,15 +1539,15 @@ std::string name = arg->asString()->value_cstr(); y2milestone("remove Schema Entry: %s", name.c_str()); std::liststd::string::iterator j; - for ( j = deleteAbleSchema.begin(); j != deleteAbleSchema.end(); j++ ) + for ( j = deleteableSchema.begin(); j != deleteableSchema.end(); j++ ) { if ( name == *j ) { - deleteAbleSchema.erase(j); + deleteableSchema.erase(j); break; } } - if ( j == deleteAbleSchema.end() ) + if ( j == deleteableSchema.end() ) { y2milestone( "Schema %s is not deleteable", name.c_str() ); return YCPBoolean(false); Modified: trunk/ldap-server/src/agent/SlapdConfigAgent.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/agent/SlapdConfigAgent.h?rev=51930&r1=51929&r2=51930&view=diff ============================================================================== --- trunk/ldap-server/src/agent/SlapdConfigAgent.h (original) +++ trunk/ldap-server/src/agent/SlapdConfigAgent.h Tue Oct 7 17:46:20 2008 @@ -74,7 +74,7 @@ OlcConfig olc; OlcDatabaseList databases; OlcSchemaList schema; - std::liststd::string deleteAbleSchema; + std::liststd::string deleteableSchema; boost::shared_ptr<OlcGlobalConfig> globals; boost::shared_ptr<OlcSchemaConfig> schemaBase; }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org