fixed bug in saving accepted pgp ids

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5217 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-06-12 21:19:38 +00:00
parent f30a3f1b16
commit 043c7a8139

View File

@ -1635,6 +1635,8 @@ bool AuthGPG::saveList(bool& cleanup, std::list<RsItem*>& lst)
#ifdef GPG_DEBUG
std::cerr << "AuthGPG::saveList() called" << std::endl ;
#endif
std::list<std::string> ids ;
getGPGAcceptedList(ids) ; // needs to be done before the lock
RsStackMutex stack(gpgMtxData); /******* LOCKED ******/
@ -1643,17 +1645,13 @@ bool AuthGPG::saveList(bool& cleanup, std::list<RsItem*>& lst)
// Now save config for network digging strategies
RsConfigKeyValueSet *vitem = new RsConfigKeyValueSet ;
std::list<std::string> ids ;
getGPGAllList(ids) ;
std::map<std::string, bool>::iterator mapIt;
for (std::list<std::string>::const_iterator it(ids.begin()); it != ids.end(); ++it)
if((*it) != mOwnGpgId.toStdString()) // skip our own id.
{
RsTlvKeyValue kv;
kv.key = mapIt->first;
kv.key = *it ;
#ifdef GPG_DEBUG
std::cerr << "AuthGPG::saveList() called (mapIt->second) : " << (mapIt->second) << std::endl ;
std::cerr << "AuthGPG::saveList() called (it->second) : " << (it->second) << std::endl ;
#endif
kv.value = "TRUE";
vitem->tlvkvs.pairs.push_back(kv) ;