added lockfile path info to the multiple-instances warning window in rs-

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4098 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-03-16 23:25:57 +00:00
parent 49aad683b1
commit 2dd6581f14
5 changed files with 21 additions and 13 deletions

View file

@ -118,7 +118,7 @@ class RsInit
* This wrapper is used to lock the profile first before
* finalising the login
*/
static int LockAndLoadCertificates(bool autoLoginNT);
static int LockAndLoadCertificates(bool autoLoginNT, std::string& lockFilePath);
/*!
@ -155,7 +155,7 @@ class RsInit
static bool RsTryAutoLogin() ;
/* Lock/unlock profile directory */
static int LockConfigDirectory(const std::string& accountDir);
static int LockConfigDirectory(const std::string& accountDir, std::string& lockFilePath);
static void UnlockConfigDirectory();
/* The true LoadCertificates() method */

View file

@ -1053,10 +1053,11 @@ int RsInit::GetPGPLoginDetails(std::string id, std::string &name, std::stri
* 1 : Another instance already has the lock
* 2 : Unexpected error
*/
int RsInit::LockConfigDirectory(const std::string& accountDir)
int RsInit::LockConfigDirectory(const std::string& accountDir, std::string& lockFilePath)
{
const std::string lockFile = accountDir + RsInitConfig::dirSeperator + "lock";
lockFilePath = lockFile;
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS
if(RsInitConfig::lockHandle != -1)
@ -1418,9 +1419,9 @@ bool RsInit::LoadPassword(std::string id, std::string inPwd)
* 2 : unexpected error while locking
* 3 : unexpected error while loading certificates
*/
int RsInit::LockAndLoadCertificates(bool autoLoginNT)
int RsInit::LockAndLoadCertificates(bool autoLoginNT, std::string& lockFilePath)
{
int retVal = LockConfigDirectory(RsInitConfig::configDir);
int retVal = LockConfigDirectory(RsInitConfig::configDir, lockFilePath);
if(retVal != 0)
return retVal;