mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 21:04:32 -04:00
Optimized startup of RetroShare by removing two unnecessary calls to AuthGPGimpl::storeAllKeys.
Fixed small hangs of RetroShare by removing the core lock in RsServer::ConfigGetDataRates. Is that needed? git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4725 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ef57cd44b3
commit
e150e31401
5 changed files with 54 additions and 23 deletions
|
@ -315,9 +315,24 @@ int AuthGPGimpl::GPGInit(const std::string &ownId)
|
|||
}
|
||||
|
||||
mOwnGpgId = ownId;
|
||||
}
|
||||
|
||||
storeAllKeys();
|
||||
// clear old cert
|
||||
gpgme_key_unref(mOwnGpgCert.key);
|
||||
mOwnGpgCert = gpgcert();
|
||||
|
||||
// search own key
|
||||
certmap::iterator it = mKeyList.find(mOwnGpgId);
|
||||
if (it != mKeyList.end()) {
|
||||
it->second.ownsign = true;
|
||||
|
||||
// store own key, grab a reference, so the key remains
|
||||
gpgme_key_ref(it->second.key);
|
||||
|
||||
mOwnGpgCert = it->second;
|
||||
}
|
||||
}
|
||||
// already stored in AuthGPGimpl::InitAuth
|
||||
// storeAllKeys();
|
||||
|
||||
int lvl = 0;
|
||||
|
||||
|
@ -2319,7 +2334,8 @@ bool AuthGPGimpl::loadList(std::list<RsItem*>& load)
|
|||
std::cerr << "AuthGPGimpl::loadList() Item Count: " << load.size() << std::endl;
|
||||
#endif
|
||||
|
||||
storeAllKeys();
|
||||
// already stored in AuthGPGimpl::InitAuth
|
||||
// storeAllKeys();
|
||||
|
||||
RsStackMutex stack(gpgMtxData); /******* LOCKED ******/
|
||||
/* load the list of accepted gpg keys */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue