diff --git a/src/common/config.cc b/src/common/config.cc index b5037b7a8e1..77843388922 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -584,7 +584,7 @@ void md_config_t::set_val_or_die(const char *key, const char *val) assert(ret == 0); } -int md_config_t::set_val(const char *key, const char *val) +int md_config_t::set_val(const char *key, const char *val, bool meta) { Mutex::Locker l(lock); if (!key) @@ -593,7 +593,8 @@ int md_config_t::set_val(const char *key, const char *val) return -EINVAL; std::string v(val); - expand_meta(v); + if (meta) + expand_meta(v); string k(ConfFile::normalize_key_name(key)); diff --git a/src/common/config.h b/src/common/config.h index 53120224e61..52144b8e3b4 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -121,7 +121,7 @@ public: // Set a configuration value. // Metavariables will be expanded. - int set_val(const char *key, const char *val); + int set_val(const char *key, const char *val, bool meta=true); // Get a configuration value. // No metavariables will be returned (they will have already been expanded)