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

Function TSRemapNewInstance

plugins/experimental/access_control/plugin.cc:119–132  ·  view source on GitHub ↗

* @brief Plugin new instance entry point. * * Processes the configuration and initializes the plugin instance. * @param argc plugin arguments number * @param argv plugin arguments * @param instance new plugin instance pointer (initialized in this function) * @param errBuf error message buffer * @param errBufSize error message buffer size * @return TS_SUCCES if success or TS_ERROR if failur

Source from the content-addressed store, hash-verified

117 * @return TS_SUCCES if success or TS_ERROR if failure
118 */
119TSReturnCode
120TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errBuf ATS_UNUSED */, int /* errBufSize ATS_UNUSED */)
121{
122 AccessControlConfig *config = new AccessControlConfig();
123 if (nullptr != config && config->init(argc, argv)) {
124 *instance = config;
125 } else {
126 AccessControlDebug("failed to initialize the " PLUGIN_NAME " plugin");
127 *instance = nullptr;
128 delete config;
129 return TS_ERROR;
130 }
131 return TS_SUCCESS;
132}
133
134/**
135 * @brief Plugin instance deletion clean-up entry point.

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected