|
@@ -731,6 +731,13 @@ int cfg_get_by_name(cfg_ctx_t *ctx, str *group_name, str *var_name,
|
|
if (cfg_lookup_var(group_name, var_name, &group, &var))
|
|
if (cfg_lookup_var(group_name, var_name, &group, &var))
|
|
return -1;
|
|
return -1;
|
|
|
|
|
|
|
|
+ if (var->def->on_change_cb) {
|
|
|
|
+ /* The variable cannot be retrieved, because the fixup
|
|
|
|
+ function may have changed it, and it is better to return
|
|
|
|
+ an error than an incorrect value */
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* use the module's handle to access the variable
|
|
/* use the module's handle to access the variable
|
|
It means that the variable is read from the local config
|
|
It means that the variable is read from the local config
|
|
after forking */
|
|
after forking */
|