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

Method reconfigure

src/proxy/IPAllow.cc:110–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void
111IpAllow::reconfigure()
112{
113 self_type *new_table;
114
115 Note("%s loading ...", ts::filename::IP_ALLOW);
116
117 new_table = new self_type("proxy.config.cache.ip_allow.filename", "proxy.config.cache.ip_categories.filename");
118 // IP rules need categories, so load them first (if they exist).
119 if (auto errata = new_table->BuildCategories(); !errata.is_ok()) {
120 std::string text;
121 swoc::bwprint(text, "{} failed to load\n{}", new_table->ip_categories_config_file, errata);
122 Error("%s", text.c_str());
123 delete new_table;
124 return;
125 }
126 if (auto errata = new_table->BuildTable(); !errata.is_ok()) {
127 std::string text;
128 swoc::bwprint(text, "{} failed to load\n{}", ts::filename::IP_ALLOW, errata);
129 if (errata.severity() <= ERRATA_ERROR) {
130 Error("%s", text.c_str());
131 } else {
132 Fatal("%s", text.c_str());
133 }
134 delete new_table;
135 return;
136 }
137 configid = configProcessor.set(configid, new_table);
138 Note("%s finished loading", ts::filename::IP_ALLOW);
139}
140
141IpAllow *
142IpAllow::acquire()

Callers

nothing calls this directly

Calls 7

BuildCategoriesMethod · 0.80
severityMethod · 0.80
ErrorClass · 0.50
is_okMethod · 0.45
c_strMethod · 0.45
BuildTableMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected