basic POC functionality established for peer module loading
This commit is contained in:
@@ -321,10 +321,10 @@ bool ConfigManager::getConfigBool(const char* section, const char* key, bool def
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
void ConfigManager::setModulePath(const std::string& module_path) {
|
||||
void ConfigManager::setModulePath(const char * module_path) {
|
||||
_module_path = module_path;
|
||||
}
|
||||
|
||||
std::string ConfigManager::getModulePath() const {
|
||||
return _module_path;
|
||||
const char * ConfigManager::getModulePath() const {
|
||||
return _module_path.c_str();
|
||||
}
|
||||
@@ -129,8 +129,6 @@ int main( int argc, char* argv[] )
|
||||
}
|
||||
}
|
||||
|
||||
g_config_manager.setModulePath(module_path);
|
||||
|
||||
// create a module loader object with the determined path
|
||||
ModuleLoader loader(module_path);
|
||||
|
||||
@@ -165,6 +163,8 @@ int main( int argc, char* argv[] )
|
||||
}
|
||||
}
|
||||
|
||||
g_config_manager.setModulePath(module_path.c_str());
|
||||
|
||||
// create a module loader object with the determined path
|
||||
ModuleLoader loader(module_path);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ extern "C" void dpm_set_logging_level(int level) {
|
||||
}
|
||||
|
||||
extern "C" const char* dpm_get_module_path(void) {
|
||||
static std::string module_path;
|
||||
static const char * module_path;
|
||||
module_path = g_config_manager.getModulePath();
|
||||
return module_path.c_str();
|
||||
return module_path;
|
||||
}
|
||||
Reference in New Issue
Block a user