MCPcopy Create free account
hub / github.com/apache/trafficserver / RecConfigReadConfigPath

Function RecConfigReadConfigPath

src/records/RecCore.cc:1081–1103  ·  view source on GitHub ↗

------------------------------------------------------------------------- RecConfigReadConfigPath -------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1079// RecConfigReadConfigPath
1080//-------------------------------------------------------------------------
1081std::string
1082RecConfigReadConfigPath(const char *file_variable, const char *default_value)
1083{
1084 std::string sysconfdir(RecConfigReadConfigDir());
1085
1086 // If the file name is in a configuration variable, look it up first ...
1087 if (file_variable) {
1088 char buf[PATH_NAME_MAX];
1089
1090 buf[0] = '\0';
1091 RecGetRecordString(file_variable, buf, PATH_NAME_MAX);
1092 if (strlen(buf) > 0) {
1093 return Layout::get()->relative_to(sysconfdir, buf);
1094 }
1095 }
1096
1097 // Otherwise take the default ...
1098 if (default_value) {
1099 return Layout::get()->relative_to(sysconfdir, default_value);
1100 }
1101
1102 return {};
1103}
1104
1105//-------------------------------------------------------------------------
1106// RecConfigReadPersistentStatsPath

Callers 15

CacheHostTableMethod · 0.85
read_config_fileMethod · 0.85
read_configMethod · 0.85
loadSocksConfigurationFunction · 0.85
initializeMethod · 0.85
startupMethod · 0.85
reconfigureMethod · 0.85
initializeMethod · 0.85
RecCoreInitFunction · 0.85
produce_layoutFunction · 0.85
ControlMatcherMethod · 0.85
IpAllowMethod · 0.85

Calls 4

RecConfigReadConfigDirFunction · 0.85
RecGetRecordStringFunction · 0.85
relative_toMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected