mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -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;
|
bool login_ok = false;
|
||||||
while(!login_ok)
|
while(!login_ok)
|
||||||
{
|
{
|
||||||
mPassword = "";
|
{
|
||||||
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
|
mPassword = "";
|
||||||
|
}
|
||||||
|
|
||||||
// skip account selection if autologin is available
|
// skip account selection if autologin is available
|
||||||
if(initResult != RS_INIT_HAVE_ACCOUNT)
|
if(initResult != RS_INIT_HAVE_ACCOUNT)
|
||||||
setRunState(WAITING_ACCOUNT_SELECT);
|
setRunState(WAITING_ACCOUNT_SELECT);
|
||||||
@ -188,11 +192,17 @@ void RsControlModule::run()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLoadPeerId.clear();
|
{
|
||||||
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
|
mLoadPeerId.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mFixedPassword = mPassword;
|
{
|
||||||
mPassword = "";
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
|
mFixedPassword = mPassword;
|
||||||
|
mPassword = "";
|
||||||
|
}
|
||||||
|
|
||||||
setRunState(WAITING_STARTUP);
|
setRunState(WAITING_STARTUP);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user