| 1224 | } |
| 1225 | |
| 1226 | TSReturnCode |
| 1227 | TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errbuf ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */) |
| 1228 | { |
| 1229 | info("Instantiating a new compress plugin remap rule"); |
| 1230 | info("Reading config from file = %s", argv[2]); |
| 1231 | |
| 1232 | const char *config_path = nullptr; |
| 1233 | |
| 1234 | if (argc > 4) { |
| 1235 | fatal("The compress plugin does not accept more than one plugin argument"); |
| 1236 | } else { |
| 1237 | config_path = TSstrdup(3 == argc ? argv[2] : ""); |
| 1238 | } |
| 1239 | if (!global_hidden_header_name) { |
| 1240 | global_hidden_header_name = init_hidden_header_name(); |
| 1241 | } |
| 1242 | |
| 1243 | Configuration *config = Configuration::Parse(config_path); |
| 1244 | *instance = config; |
| 1245 | |
| 1246 | free((void *)config_path); |
| 1247 | info("Configuration loaded"); |
| 1248 | return TS_SUCCESS; |
| 1249 | } |
| 1250 | |
| 1251 | void |
| 1252 | TSRemapDeleteInstance(void *instance) |
nothing calls this directly
no test coverage detected