mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Fixed: Information about wrong password
This commit is contained in:
parent
2aac999568
commit
66a9dadb98
2 changed files with 11 additions and 2 deletions
|
@ -26,6 +26,7 @@ RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, A
|
|||
mAutoLoginNextTime(false),
|
||||
mWantPassword(false),
|
||||
mPrevIsBad(false),
|
||||
mCountAttempts(0),
|
||||
mPassword("")
|
||||
{
|
||||
mStateToken = sts->getNewToken();
|
||||
|
@ -64,7 +65,14 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string
|
|||
{
|
||||
RS_STACK_MUTEX(mDataMtx); // ********** LOCKED **********
|
||||
|
||||
mPrevIsBad = prev_is_bad;
|
||||
mCountAttempts++;
|
||||
if(mCountAttempts == 3)
|
||||
{
|
||||
mPrevIsBad = prev_is_bad;
|
||||
mCountAttempts = 0;
|
||||
}
|
||||
else
|
||||
mPrevIsBad = false;
|
||||
|
||||
if(mFixedPassword != "")
|
||||
{
|
||||
|
|
|
@ -78,7 +78,8 @@ private:
|
|||
// to notify that a password callback is waiting
|
||||
// to answer the request, clear the flag and set the password
|
||||
bool mWantPassword;
|
||||
bool mPrevIsBad ;
|
||||
bool mPrevIsBad;
|
||||
int mCountAttempts;
|
||||
std::string mTitle;
|
||||
std::string mKeyName;
|
||||
std::string mPassword;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue