- moved lock handle functions to rsdir.h/cc

- created a scope guard to manage file lock handles
- added lock gards to PGP keyring read/writes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5216 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-06-12 20:31:13 +00:00
parent 1885fb66c4
commit f30a3f1b16
7 changed files with 185 additions and 98 deletions

View file

@ -109,7 +109,7 @@ class AuthGPG: public p3Config, public RsThread, public PGPHandler
{
public:
static void init(const std::string& path_to_pubring, const std::string& path_to_secring);
static void init(const std::string& path_to_pubring, const std::string& path_to_secring,const std::string& pgp_lock_file);
static void exit();
static AuthGPG *getAuthGPG() { return _instance ; }
@ -220,7 +220,7 @@ class AuthGPG: public p3Config, public RsThread, public PGPHandler
virtual bool addService(AuthGPGService *service) ;
protected:
AuthGPG(const std::string& path_to_pubring, const std::string& path_to_secring);
AuthGPG(const std::string& path_to_pubring, const std::string& path_to_secring,const std::string& pgp_lock_file);
virtual ~AuthGPG();
/*****************************************************************/