From 8863b9db93d5c8367f663b5a54db4c359e9d58f8 Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Thu, 15 Oct 2020 14:53:27 +0800 Subject: [PATCH] common/plugin: correct output filename path The around code use fname as output in some places. Unify the file name variable to be fname. Signed-off-by: Changcheng Liu --- src/common/PluginRegistry.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/PluginRegistry.cc b/src/common/PluginRegistry.cc index 4b8d6156adfe4..dd85d64fda0ec 100644 --- a/src/common/PluginRegistry.cc +++ b/src/common/PluginRegistry.cc @@ -144,9 +144,9 @@ int PluginRegistry::load(const std::string &type, if (!library) { string err1(dlerror()); // fall back to plugin_dir - std::string fname2 = cct->_conf.get_val("plugin_dir") + "/" + PLUGIN_PREFIX + + fname = cct->_conf.get_val("plugin_dir") + "/" + PLUGIN_PREFIX + name + PLUGIN_SUFFIX; - library = dlopen(fname2.c_str(), RTLD_NOW); + library = dlopen(fname.c_str(), RTLD_NOW); if (!library) { lderr(cct) << __func__ << " failed dlopen(): \"" << err1.c_str() -- 2.39.5