From 9402b8e239a77b11c39a3df6aa9ed3be9433bd09 Mon Sep 17 00:00:00 2001 From: Konrad Date: Mon, 10 Apr 2017 23:42:22 +0200 Subject: [PATCH] Fixed: mFixedPassword remained empty after logging --- libresapi/src/api/RsControlModule.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libresapi/src/api/RsControlModule.cpp b/libresapi/src/api/RsControlModule.cpp index f65c6058c..f8e2d7e1e 100644 --- a/libresapi/src/api/RsControlModule.cpp +++ b/libresapi/src/api/RsControlModule.cpp @@ -67,7 +67,7 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string mPrevIsBad = prev_is_bad; if(mFixedPassword != "") - { + { password = mFixedPassword; return true; } @@ -80,7 +80,6 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string { password = mPassword; mWantPassword = false; - mPassword = ""; return true; } @@ -95,8 +94,7 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string if(mPassword != "") { - password = mPassword; - mPassword = ""; + password = mPassword; mWantPassword = false; mStateTokenServer->replaceToken(mStateToken); return true; @@ -138,6 +136,7 @@ void RsControlModule::run() bool login_ok = false; while(!login_ok) { + mPassword = ""; // skip account selection if autologin is available if(initResult != RS_INIT_HAVE_ACCOUNT) setRunState(WAITING_ACCOUNT_SELECT); @@ -190,10 +189,10 @@ void RsControlModule::run() } mLoadPeerId.clear(); - mPassword = ""; } mFixedPassword = mPassword; + mPassword = ""; setRunState(WAITING_STARTUP);