fixed bug preventing plugins to be enabled after restart

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5546 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-09-13 18:52:03 +00:00
parent 5c5776d486
commit f4b13bbed3

View File

@ -90,6 +90,13 @@ void RsPluginManager::disablePlugin(const std::string& hash)
_accepted_hashes.erase(it) ;
IndicateConfigChanged() ;
}
if(_rejected_hashes.find(hash) == _rejected_hashes.end())
{
std::cerr << "RsPluginManager::enablePlugin(): inserting hash " << hash << " in black list" << std::endl;
_rejected_hashes.insert(hash) ;
IndicateConfigChanged() ;
}
}
void RsPluginManager::enablePlugin(const std::string& hash)
@ -101,6 +108,15 @@ void RsPluginManager::enablePlugin(const std::string& hash)
_accepted_hashes.insert(hash) ;
IndicateConfigChanged() ;
}
std::set<std::string>::const_iterator it(_rejected_hashes.find(hash)) ;
if(it != _rejected_hashes.end())
{
std::cerr << "RsPluginManager::enablePlugin(): removing hash " << hash << " from black list" << std::endl;
_rejected_hashes.erase(it) ;
IndicateConfigChanged() ;
}
}
void RsPluginManager::loadPlugins(const std::vector<std::string>& plugin_directories)