mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 06:32:55 -04:00
forgot this from previous commit
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8416 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
74c01423f0
commit
978239f32f
3 changed files with 6 additions and 4 deletions
|
@ -52,8 +52,9 @@ bool RsControlModule::processShouldExit()
|
||||||
return mProcessShouldExit;
|
return mProcessShouldExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsControlModule::askForPassword(const std::string &key_details, bool prev_is_bad, std::string &password)
|
bool RsControlModule::askForPassword(const std::string &key_details, bool prev_is_bad, std::string &password, bool& cancelled)
|
||||||
{
|
{
|
||||||
|
cancelled = false ;
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
mWantPassword = true;
|
mWantPassword = true;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
bool processShouldExit();
|
bool processShouldExit();
|
||||||
|
|
||||||
// from NotifyClient
|
// from NotifyClient
|
||||||
virtual bool askForPassword(const std::string& key_details, bool prev_is_bad , std::string& password);
|
virtual bool askForPassword(const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// from RsThread
|
// from RsThread
|
||||||
|
|
|
@ -437,8 +437,9 @@ void generatePasswordHash()
|
||||||
std::string sshPwdForHash = "";
|
std::string sshPwdForHash = "";
|
||||||
|
|
||||||
std::string passwd1,passwd2 ;
|
std::string passwd1,passwd2 ;
|
||||||
|
bool cancel ;
|
||||||
|
|
||||||
if(!NotifyTxt().askForPassword("Type your password (at least 8 chars) : ",false,passwd1)) exit(1) ;
|
if(!NotifyTxt().askForPassword("Type your password (at least 8 chars) : ",false,passwd1,cancel)) exit(1) ;
|
||||||
|
|
||||||
if(passwd1.length() < 8)
|
if(passwd1.length() < 8)
|
||||||
{
|
{
|
||||||
|
@ -446,7 +447,7 @@ void generatePasswordHash()
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NotifyTxt().askForPassword("Type your password (checking) : ",false,passwd2)) exit(1) ;
|
if(!NotifyTxt().askForPassword("Type your password (checking) : ",false,passwd2,cancel)) exit(1) ;
|
||||||
|
|
||||||
if(passwd1 != passwd2)
|
if(passwd1 != passwd2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue