You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/06/20 05:25:28 UTC

trafficserver git commit: TS-3546: Force global plugin registration with TSPluginRegister API and remove version information Fixed problem with where to call Fatal when a plugin didn't register

Repository: trafficserver
Updated Branches:
  refs/heads/master b7e60e486 -> 95dd7fdf8


TS-3546: Force global plugin registration with TSPluginRegister API and remove version information
Fixed problem with where to call Fatal when a plugin didn't register


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/95dd7fdf
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/95dd7fdf
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/95dd7fdf

Branch: refs/heads/master
Commit: 95dd7fdf87dd88c6b43484507576abac794976f7
Parents: b7e60e4
Author: Bryan Call <bc...@apache.org>
Authored: Fri Jun 19 20:23:41 2015 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Fri Jun 19 20:23:41 2015 -0700

----------------------------------------------------------------------
 proxy/Plugin.cc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/95dd7fdf/proxy/Plugin.cc
----------------------------------------------------------------------
diff --git a/proxy/Plugin.cc b/proxy/Plugin.cc
index 438362d..6927fa1 100644
--- a/proxy/Plugin.cc
+++ b/proxy/Plugin.cc
@@ -116,16 +116,12 @@ plugin_load(int argc, char *argv[], bool validateOnly)
     plugin_reg_current->dlh = handle;
 
     init = (init_func_t)dlsym(plugin_reg_current->dlh, "TSPluginInit");
-    if (!init || plugin_reg_current->plugin_registered == false) {
+    if (!init) {
       delete plugin_reg_current;
       if (validateOnly) {
         return false;
       }
-      if (!init) {
-        Fatal("unable to find TSPluginInit function in '%s': %s", path, dlerror());
-      } else {
-        Fatal("plugin not registered by calling TSPluginRegister");
-      }
+      Fatal("unable to find TSPluginInit function in '%s': %s", path, dlerror());
       return false; // this line won't get called since Fatal brings down ATS
     }
 
@@ -135,7 +131,8 @@ plugin_load(int argc, char *argv[], bool validateOnly)
   if (plugin_reg_current->plugin_registered) {
     plugin_reg_list.push(plugin_reg_current);
   } else {
-    delete plugin_reg_current;
+    Fatal("plugin not registered by calling TSPluginRegister");
+    return false; // this line won't get called since Fatal brings down ATS
   }
 
   plugin_reg_current = NULL;