Initialize the plugin as a remap plugin. */
| 1225 | Initialize the plugin as a remap plugin. |
| 1226 | */ |
| 1227 | TSReturnCode |
| 1228 | TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size) |
| 1229 | { |
| 1230 | if (!api_info) { |
| 1231 | strncpy(errbuf, "[TSRemapInit] - Invalid TSRemapInterface argument", errbuf_size - 1); |
| 1232 | return TS_ERROR; |
| 1233 | } |
| 1234 | |
| 1235 | if (api_info->size < sizeof(TSRemapInterface)) { |
| 1236 | strncpy(errbuf, "[TSRemapInit] - Incorrect size of TSRemapInterface structure", errbuf_size - 1); |
| 1237 | return TS_ERROR; |
| 1238 | } |
| 1239 | |
| 1240 | if (TSUserArgIndexReserve(TS_USER_ARGS_TXN, DEBUG_TAG, "will save plugin-enable flag here", &arg_idx) != TS_SUCCESS) { |
| 1241 | LOG_ERROR("failed to reserve private data slot"); |
| 1242 | return TS_ERROR; |
| 1243 | } else { |
| 1244 | LOG_DEBUG("txn_arg_idx: %d", arg_idx); |
| 1245 | } |
| 1246 | |
| 1247 | Dbg(dbg_ctl, "%s plugin's remap part is initialized", DEBUG_TAG); |
| 1248 | |
| 1249 | return TS_SUCCESS; |
| 1250 | } |
| 1251 | |
| 1252 | TSReturnCode |
| 1253 | TSRemapNewInstance(int /* argc ATS_UNUSED */, char *argv[], void **ih, char * /* errbuf ATS_UNUSED */, |
nothing calls this directly
no test coverage detected