From 043c7a8139e1c401ee41e5c6b9ac410cac311002 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 12 Jun 2012 21:19:38 +0000 Subject: [PATCH] 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 --- libretroshare/src/pqi/authgpg.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index b3abbe397..f023998b0 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -1635,6 +1635,8 @@ bool AuthGPG::saveList(bool& cleanup, std::list& lst) #ifdef GPG_DEBUG std::cerr << "AuthGPG::saveList() called" << std::endl ; #endif + std::list 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& lst) // Now save config for network digging strategies RsConfigKeyValueSet *vitem = new RsConfigKeyValueSet ; - std::list ids ; - getGPGAllList(ids) ; - - std::map::iterator mapIt; for (std::list::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) ;