basic POC functionality established for peer module loading

This commit is contained in:
Chris Punches
2025-03-27 22:28:02 -04:00
parent 448dc0cdfd
commit 7b29824e40
9 changed files with 177 additions and 82 deletions

View File

@@ -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();
}

View File

@@ -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);

View File

@@ -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;
}