2
0
mirror of https://github.com/meganz/MEGAcmd synced 2025-08-29 12:57:44 +00:00

fix attempt to set invalid value at startup

This commit is contained in:
Pablo Martin 2025-03-20 11:09:03 +01:00
parent 045a6305d8
commit 21ea5fbbbb
No known key found for this signature in database
GPG Key ID: 1746978B12F13D6E

View File

@ -2644,6 +2644,8 @@ int MegaCmdExecuter::actUponLogin(SynchronousRequestListener *srl, int timeout)
{
auto megaCmdListener = std::make_unique<MegaCmdListener>(nullptr);
auto value = ConfigurationManager::getConfigurationValue(up ? "maxuploadconnections" : "maxdownloadconnections", -1);
if (value != -1)
{
api->setMaxConnections(up ? 1 : 0, value, megaCmdListener.get());
megaCmdListener->wait();
if (megaCmdListener->getError()->getErrorCode() != MegaError::API_OK)
@ -2652,6 +2654,7 @@ int MegaCmdExecuter::actUponLogin(SynchronousRequestListener *srl, int timeout)
<< megaCmdListener->getError()->getErrorString();
}
}
}
api->useHttpsOnly(ConfigurationManager::getConfigurationValue("https", false));
api->disableGfxFeatures(!ConfigurationManager::getConfigurationValue("graphics", true));