Added version check

pull/2407/head
René Cannaò 6 years ago committed by Valentin Rakush
parent 6a6bfefd44
commit cb393da459

@ -62,6 +62,7 @@ class ProxySQL_GlobalVariables {
bool gdbg;
bool nostart;
bool monitor;
bool version_check;
#ifdef SO_REUSEPORT
bool reuseport;
#endif /* SO_REUSEPORT */

@ -506,6 +506,7 @@ struct _global_variables_t {
bool has_debug;
bool idle_threads;
bool version_check;
volatile int shutdown;
bool nostart;

@ -60,7 +60,7 @@ ProxySQL_GlobalVariables::ProxySQL_GlobalVariables() {
statuses.stack_memory_admin_threads = 0;
statuses.stack_memory_cluster_threads = 0;
global.version_check = true;
global.gdbg=false;
global.nostart=false;
global.foreground=false;
@ -114,6 +114,7 @@ ProxySQL_GlobalVariables::ProxySQL_GlobalVariables() {
#ifdef IDLE_THREADS
opt->add((const char *)"",0,0,0,(const char *)"Create auxiliary threads to handle idle connections",(const char *)"--idle-threads");
#endif /* IDLE_THREADS */
opt->add((const char *)"",0,0,0,(const char *)"Do not check for the latest version of ProxySQL",(const char *)"--no-version-check");
opt->add((const char *)"",0,1,0,(const char *)"Administration Unix Socket",(const char *)"-S",(const char *)"--admin-socket");
opt->add((const char *)"",0,0,0,(const char *)"Enable SQLite3 Server",(const char *)"--sqlite3-server");
@ -188,6 +189,10 @@ void ProxySQL_GlobalVariables::process_opts_pre() {
}
#endif /* IDLE_THREADS */
if (opt->isSet("--no-version-check")) {
global.version_check=false;
glovars.version_check=false;
}
if (opt->isSet("--sqlite3-server")) {
global.sqlite3_server=true;
}

@ -1680,8 +1680,7 @@ __start_label:
#endif
}
//if (GloVars.check_for_new_version) {
if (0) {
if (GloVars.global.version_check) {
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);

Loading…
Cancel
Save