]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Document config_var_is_dumpable and config_var_is_settable.
authorNick Mathewson <nickm@torproject.org>
Thu, 5 Sep 2019 15:48:27 +0000 (11:48 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 11 Sep 2019 13:42:19 +0000 (09:42 -0400)
src/app/config/confparse.c

index 3d3f4e1bb1019e162062981fe86e07ca90b41dd6..3341ee7844942f3c898be14656f72995af9d823f 100644 (file)
@@ -522,6 +522,10 @@ config_var_is_replaced_on_set(const config_var_t *var)
   return ! struct_var_is_cumulative(&var->member);
 }
 
+/**
+ * Return true iff <b>var</b> may be assigned by name (e.g., via the
+ * CLI, the configuration files, or the controller API).
+ **/
 bool
 config_var_is_settable(const config_var_t *var)
 {
@@ -529,6 +533,7 @@ config_var_is_settable(const config_var_t *var)
     return false;
   return struct_var_is_settable(&var->member);
 }
+
 bool
 config_var_is_contained(const config_var_t *var)
 {
@@ -545,6 +550,14 @@ config_var_is_listable(const config_var_t *var)
   return (var->flags & CVFLAG_INVISIBLE) == 0;
 }
 
+/**
+ * Return true iff variable <b>var</b> should be written out when we
+ * are writing our configuration to disk, to a controller, or via the
+ * --dump-config command.
+ *
+ * This option may be set because a variable is hidden, or because it is
+ * derived from another variable which will already be written out.
+ **/
 bool
 config_var_is_dumpable(const config_var_t *var)
 {