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

Function plugin_dso_load

src/proxy/Plugin.cc:113–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool
114plugin_dso_load(const char *path, void *&handle, void *&init, std::string &error)
115{
116 handle = dlopen(path, RTLD_NOW);
117 init = nullptr;
118 if (!handle) {
119 error.assign("unable to load '").append(path).append("': ").append(dlerror());
120 Error("%s", error.c_str());
121 return false;
122 }
123
124 init = dlsym(handle, "TSPluginInit");
125 if (!init) {
126 error.assign("unable to find TSPluginInit function in '").append(path).append("': ").append(dlerror());
127 Error("%s", error.c_str());
128 dlclose(handle);
129 handle = nullptr;
130 return false;
131 }
132
133 return true;
134}
135
136static bool
137single_plugin_init(int argc, char *argv[], bool validateOnly)

Callers 2

single_plugin_initFunction · 0.85
try_loading_pluginFunction · 0.85

Calls 4

ErrorClass · 0.50
appendMethod · 0.45
assignMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected