Reindroduce the read/write mutex for AuthGPG as mutex for the data member.

Added second mutex for the gpg engine.
Now the call to the gpg engine (for example AuthGPGimpl::LoadCertificateFromString) doesn't block the GUI.
The existing problem is still the call of AuthGPGimpl::storeAllKeys every minute before access the gpg data.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3555 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-09-28 22:30:57 +00:00
parent 0e460eec90
commit d3fc7f3982
4 changed files with 238 additions and 166 deletions

View file

@ -371,7 +371,13 @@ private:
static AuthGPG *instance_gpg; // pointeur vers le singleton
RsMutex gpgMtx;
RsMutex gpgMtxEngine;
/* Below is protected via the mutex */
gpgme_engine_info_t INFO;
gpgme_ctx_t CTX;
RsReadWriteMutex gpgMtxData;
/* Below is protected via the mutex */
certmap mKeyList;
@ -381,9 +387,6 @@ private:
bool gpgmeKeySelected;
gpgme_engine_info_t INFO;
gpgme_ctx_t CTX;
std::string mOwnGpgId;
gpgcert mOwnGpgCert;