working out peer module loading
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user