mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed: Thread safe access to RsControlModule member variables
This commit is contained in:
parent
dcc8c6e4c3
commit
144d57047c
@ -136,7 +136,11 @@ void RsControlModule::run()
|
||||
bool login_ok = false;
|
||||
while(!login_ok)
|
||||
{
|
||||
mPassword = "";
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mPassword = "";
|
||||
}
|
||||
|
||||
// skip account selection if autologin is available
|
||||
if(initResult != RS_INIT_HAVE_ACCOUNT)
|
||||
setRunState(WAITING_ACCOUNT_SELECT);
|
||||
@ -188,11 +192,17 @@ void RsControlModule::run()
|
||||
break;
|
||||
}
|
||||
|
||||
mLoadPeerId.clear();
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mLoadPeerId.clear();
|
||||
}
|
||||
}
|
||||
|
||||
mFixedPassword = mPassword;
|
||||
mPassword = "";
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mFixedPassword = mPassword;
|
||||
mPassword = "";
|
||||
}
|
||||
|
||||
setRunState(WAITING_STARTUP);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user