Add separate option to set libcurl to verbose mode

New --curl-verbose option is used to set libcurl to verbose mode.
Old --verbose option is still used to print more information but no longer sets libcurl to verbose mode.
This commit is contained in:
Sude 2018-09-05 17:51:03 +03:00
parent 35b178e674
commit 05e9409d52

View File

@ -197,6 +197,7 @@ int main(int argc, char *argv[])
("no-duplicate-handling", bpo::value<bool>(&bNoDuplicateHandler)->zero_tokens()->default_value(false), "Don't use duplicate handler for installers\nDuplicate installers from different languages are handled separately") ("no-duplicate-handling", bpo::value<bool>(&bNoDuplicateHandler)->zero_tokens()->default_value(false), "Don't use duplicate handler for installers\nDuplicate installers from different languages are handled separately")
("no-subdirectories", bpo::value<bool>(&bNoSubDirectories)->zero_tokens()->default_value(false), "Don't create subdirectories for extras, patches and language packs") ("no-subdirectories", bpo::value<bool>(&bNoSubDirectories)->zero_tokens()->default_value(false), "Don't create subdirectories for extras, patches and language packs")
("verbose", bpo::value<bool>(&Globals::globalConfig.bVerbose)->zero_tokens()->default_value(false), "Print lots of information") ("verbose", bpo::value<bool>(&Globals::globalConfig.bVerbose)->zero_tokens()->default_value(false), "Print lots of information")
("curl-verbose", bpo::value<bool>(&Globals::globalConfig.curlConf.bVerbose)->zero_tokens()->default_value(false), "Set libcurl to verbose mode")
("insecure", bpo::value<bool>(&bInsecure)->zero_tokens()->default_value(false), "Don't verify authenticity of SSL certificates") ("insecure", bpo::value<bool>(&bInsecure)->zero_tokens()->default_value(false), "Don't verify authenticity of SSL certificates")
("timeout", bpo::value<long int>(&Globals::globalConfig.curlConf.iTimeout)->default_value(10), "Set timeout for connection\nMaximum time in seconds that connection phase is allowed to take") ("timeout", bpo::value<long int>(&Globals::globalConfig.curlConf.iTimeout)->default_value(10), "Set timeout for connection\nMaximum time in seconds that connection phase is allowed to take")
("retries", bpo::value<int>(&Globals::globalConfig.iRetries)->default_value(3), "Set maximum number of retries on failed download") ("retries", bpo::value<int>(&Globals::globalConfig.iRetries)->default_value(3), "Set maximum number of retries on failed download")
@ -430,7 +431,6 @@ int main(int argc, char *argv[])
set_vm_value(vm, "threads", Globals::globalConfig.iThreads); set_vm_value(vm, "threads", Globals::globalConfig.iThreads);
} }
Globals::globalConfig.curlConf.bVerbose = Globals::globalConfig.bVerbose;
Globals::globalConfig.curlConf.bVerifyPeer = !bInsecure; Globals::globalConfig.curlConf.bVerifyPeer = !bInsecure;
Globals::globalConfig.bColor = !bNoColor; Globals::globalConfig.bColor = !bNoColor;
Globals::globalConfig.bUnicode = !bNoUnicode; Globals::globalConfig.bUnicode = !bNoUnicode;