| 126 | } |
| 127 | |
| 128 | void |
| 129 | TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) |
| 130 | { |
| 131 | TSPluginRegistrationInfo info; |
| 132 | |
| 133 | info.plugin_name = PLUGIN_NAME; |
| 134 | info.vendor_name = "Apache Software Foundation"; |
| 135 | info.support_email = "dev@trafficserver.apache.org"; |
| 136 | |
| 137 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 138 | Dbg(dbg_ctl, "[%s] Plugin registration failed, plugin disabled", PLUGIN_NAME); |
| 139 | |
| 140 | return; |
| 141 | } |
| 142 | |
| 143 | /* This is call we could use if we need to protect global data */ |
| 144 | /* TSReleaseAssert ((mutex = TSMutexCreate()) != TS_NULL_MUTEX); */ |
| 145 | |
| 146 | TSMutex mutex = TS_NULL_MUTEX; |
| 147 | TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(global_plugin, mutex)); |
| 148 | Dbg(dbg_ctl, "[%s] Plugin registration succeeded", PLUGIN_NAME); |
| 149 | } |
nothing calls this directly
no test coverage detected