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

Function loadHandlerConf

plugins/esi/esi.cc:1580–1596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1578}
1579
1580static void
1581loadHandlerConf(const char *file_name, Utils::KeyValueMap &handler_conf)
1582{
1583 std::list<string> conf_lines;
1584 TSFile conf_file = TSfopen(file_name, "r");
1585 if (conf_file != nullptr) {
1586 char buf[1024];
1587 while (TSfgets(conf_file, buf, sizeof(buf) - 1) != nullptr) {
1588 conf_lines.push_back(string(buf));
1589 }
1590 TSfclose(conf_file);
1591 Utils::parseKeyValueConfig(conf_lines, handler_conf, gAllowlistCookies);
1592 Dbg(dbg_ctl_local, "[%s] Loaded handler conf file [%s]", __FUNCTION__, file_name);
1593 } else {
1594 TSError("[esi][%s] Failed to open handler config file [%s]", __FUNCTION__, file_name);
1595 }
1596}
1597
1598static int
1599esiPluginInit(int argc, const char *argv[], OptionInfo *pOptionInfo)

Callers 1

esiPluginInitFunction · 0.85

Calls 6

TSfopenFunction · 0.85
TSfgetsFunction · 0.85
stringClass · 0.85
TSfcloseFunction · 0.85
TSErrorFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected