mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-18 10:58:43 -04:00
added test to prevent using twice the same config file; changed duplicate config file name causing deserialisation errors and loss of some config files; added printout of hex code for RsItems that fail deserialisation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8075 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cb6860a08d
commit
ae0603a687
3 changed files with 19 additions and 5 deletions
libretroshare/src/pqi
|
@ -175,7 +175,16 @@ void p3ConfigMgr::addConfiguration(std::string file, pqiConfig *conf)
|
|||
std::cerr << "\tIgnoring new filename " << filename;
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// also check that the filename is not already registered for another config
|
||||
|
||||
for(std::list<pqiConfig*>::const_iterator it = mConfigs.begin();it!= mConfigs.end();++it)
|
||||
if( (*it)->filename == filename )
|
||||
{
|
||||
std::cerr << "!!!!!!!!!!! Trying to register a config for file \"" << filename << "\" that is already registered" << std::endl;
|
||||
std::cerr << "!!!!!!!!!!! Please correct the code !" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
conf->setFilename(filename);
|
||||
mConfigs.push_back(conf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue