diff --git a/uwsgi.c b/uwsgi.c index 59b2b4aa..0ee45a93 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -146,7 +146,7 @@ static struct uwsgi_option uwsgi_base_options[] = { {"signal-bufsize", required_argument, 0, "set buffer size for signal queue", uwsgi_opt_set_int, &uwsgi.signal_bufsize, 0}, {"signals-bufsize", required_argument, 0, "set buffer size for signal queue", uwsgi_opt_set_int, &uwsgi.signal_bufsize, 0}, - {"disable-logging", no_argument, 'L', "disable request logging", uwsgi_opt_dyn_true, (void *) UWSGI_OPTION_LOGGING, 0}, + {"disable-logging", no_argument, 'L', "disable request logging", uwsgi_opt_dyn_false, (void *) UWSGI_OPTION_LOGGING, 0}, {"pidfile", required_argument, 0, "create pidfile (before privileges drop)", uwsgi_opt_set_str, &uwsgi.pidfile,0}, {"pidfile2", required_argument, 0, "create pidfile (after privileges drop)", uwsgi_opt_set_str, &uwsgi.pidfile2,0}, @@ -3215,6 +3215,13 @@ void uwsgi_opt_dyn_true(char *opt, char *value, void *key) { uwsgi.shared->options[dyn_opt_id] = 1; } +void uwsgi_opt_dyn_false(char *opt, char *value, void *key) { + + long *fake_ptr = (long *) key; + uint8_t dyn_opt_id = (long) fake_ptr; + uwsgi.shared->options[dyn_opt_id] = 0; +} + void uwsgi_opt_set_str(char *opt, char *value, void *key) { char **ptr = (char **) key; *ptr = (char *) value; diff --git a/uwsgi.h b/uwsgi.h index 7b6ab2d7..89a9ea0c 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -2499,6 +2499,7 @@ void uwsgi_opt_set_64bit(char *, char *, void *); void uwsgi_opt_set_megabytes(char *, char *, void *); void uwsgi_opt_set_dyn(char *, char *, void *); void uwsgi_opt_dyn_true(char *, char *, void *); +void uwsgi_opt_dyn_false(char *, char *, void *); void uwsgi_opt_set_placeholder(char *, char *, void *); void uwsgi_opt_add_shared_socket(char *, char *, void *); void uwsgi_opt_add_socket(char *, char *, void *);