working out peer module loading

This commit is contained in:
Chris Punches
2025-03-27 21:51:21 -04:00
parent 49c73d1876
commit 448dc0cdfd
12 changed files with 96 additions and 9 deletions

View File

@@ -320,3 +320,11 @@ bool ConfigManager::getConfigBool(const char* section, const char* key, bool def
// If not recognized, return default
return defaultValue;
}
void ConfigManager::setModulePath(const std::string& module_path) {
_module_path = module_path;
}
std::string ConfigManager::getModulePath() const {
return _module_path;
}

View File

@@ -129,6 +129,8 @@ 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);

View File

@@ -120,4 +120,10 @@ extern "C" void dpm_set_logging_level(int level) {
}
g_logger.setLogLevel(log_level);
}
extern "C" const char* dpm_get_module_path(void) {
static std::string module_path;
module_path = g_config_manager.getModulePath();
return module_path.c_str();
}