| 108 | } |
| 109 | |
| 110 | void |
| 111 | IpAllow::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 | |
| 141 | IpAllow * |
| 142 | IpAllow::acquire() |
nothing calls this directly
no test coverage detected