Fix cases where stk connects to the internet while the user forbid it, see #3319
This commit is contained in:
parent
8995027d42
commit
3ff0724cb4
@ -122,7 +122,8 @@ namespace Online
|
||||
// current player would not be defined at this stage.
|
||||
PlayerProfile *player = PlayerManager::getCurrentPlayer();
|
||||
if (player && player->wasOnlineLastTime() &&
|
||||
!UserConfigParams::m_always_show_login_screen)
|
||||
!UserConfigParams::m_always_show_login_screen &&
|
||||
UserConfigParams::m_internet_status != RequestManager::IPERM_NOT_ALLOWED)
|
||||
{
|
||||
PlayerManager::resumeSavedSession();
|
||||
}
|
||||
@ -164,6 +165,12 @@ namespace Online
|
||||
*/
|
||||
void RequestManager::addRequest(Request *request)
|
||||
{
|
||||
if (UserConfigParams::m_internet_status == RequestManager::IPERM_NOT_ALLOWED)
|
||||
{
|
||||
Log::error("RequestManager", "addRequest called, but internet connections are forbidden");
|
||||
return;
|
||||
}
|
||||
|
||||
assert(request->isPreparing());
|
||||
request->setBusy();
|
||||
m_request_queue.lock();
|
||||
|
@ -257,7 +257,11 @@ void BaseUserScreen::selectUser(int index)
|
||||
}
|
||||
|
||||
// Now last use was with online --> Display the saved data
|
||||
m_online_cb->setState(true);
|
||||
if (UserConfigParams::m_internet_status == Online::RequestManager::IPERM_NOT_ALLOWED)
|
||||
m_online_cb->setState(false);
|
||||
else
|
||||
m_online_cb->setState(true);
|
||||
|
||||
makeEntryFieldsVisible();
|
||||
m_username_tb->setActive(profile->getLastOnlineName().size() == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user