mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05: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