mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Make config_var_is_invisible a function.
This commit is contained in:
parent
65511a45ad
commit
eb54fe8f97
@ -8137,7 +8137,7 @@ getinfo_helper_config(control_connection_t *conn,
|
|||||||
for (i = 0; option_vars_[i].member.name; ++i) {
|
for (i = 0; option_vars_[i].member.name; ++i) {
|
||||||
const config_var_t *var = &option_vars_[i];
|
const config_var_t *var = &option_vars_[i];
|
||||||
/* don't tell controller about invisible options */
|
/* don't tell controller about invisible options */
|
||||||
if (option_vars_[i].flags & CVFLAG_INVISIBLE)
|
if (config_var_is_invisible(var))
|
||||||
continue;
|
continue;
|
||||||
const char *type = struct_var_get_typename(&var->member);
|
const char *type = struct_var_get_typename(&var->member);
|
||||||
if (!type)
|
if (!type)
|
||||||
|
@ -164,6 +164,11 @@ config_var_is_contained(const config_var_t *var)
|
|||||||
{
|
{
|
||||||
return struct_var_is_contained(&var->member);
|
return struct_var_is_contained(&var->member);
|
||||||
}
|
}
|
||||||
|
bool
|
||||||
|
config_var_is_invisible(const config_var_t *var)
|
||||||
|
{
|
||||||
|
return (var->flags & CVFLAG_INVISIBLE) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions to assign config options.
|
* Functions to assign config options.
|
||||||
|
@ -107,6 +107,7 @@ void warn_deprecated_option(const char *what, const char *why);
|
|||||||
bool config_var_is_cumulative(const config_var_t *var);
|
bool config_var_is_cumulative(const config_var_t *var);
|
||||||
bool config_var_is_settable(const config_var_t *var);
|
bool config_var_is_settable(const config_var_t *var);
|
||||||
bool config_var_is_contained(const config_var_t *var);
|
bool config_var_is_contained(const config_var_t *var);
|
||||||
|
bool config_var_is_invisible(const config_var_t *var);
|
||||||
|
|
||||||
/* Helper macros to compare an option across two configuration objects */
|
/* Helper macros to compare an option across two configuration objects */
|
||||||
#define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)
|
#define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)
|
||||||
|
Loading…
Reference in New Issue
Block a user