mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 09:56:14 -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)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
mPassword = "";
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
mLoadPeerId.clear();
|
mLoadPeerId.clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||||
mFixedPassword = mPassword;
|
mFixedPassword = mPassword;
|
||||||
mPassword = "";
|
mPassword = "";
|
||||||
|
}
|
||||||
|
|
||||||
setRunState(WAITING_STARTUP);
|
setRunState(WAITING_STARTUP);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user