Release 1.1.0 with transactional plugin validation
This commit is contained in:
6 files changed
+115
-4
No files matched your search
@@ -254,6 +254,13 @@ namespace Void::Plugin
|
||||
return std::unexpected{inst.error()};
|
||||
}
|
||||
std::string name{(*inst)->plugin->name()};
|
||||
if (m_options.candidate_validator &&
|
||||
!m_options.candidate_validator(PluginHandle{*inst})) {
|
||||
Void::Log::warn("Plugin.Manager",
|
||||
"load '{}' aborted: binary validation failed",
|
||||
name);
|
||||
return std::unexpected{LoadError::ActivationFailed};
|
||||
}
|
||||
if (m_options.config_provider && (*inst)->configure != nullptr) {
|
||||
const std::string config = m_options.config_provider(name);
|
||||
(*inst)->configure((*inst)->plugin, config.c_str());
|
||||
@@ -425,6 +432,13 @@ namespace Void::Plugin
|
||||
name, (*next)->plugin->name());
|
||||
return std::unexpected{LoadError::NameMismatch};
|
||||
}
|
||||
if (m_options.candidate_validator &&
|
||||
!m_options.candidate_validator(PluginHandle{*next})) {
|
||||
Void::Log::warn("Plugin.Manager",
|
||||
"reload '{}' aborted: binary validation failed",
|
||||
name);
|
||||
return std::unexpected{LoadError::ActivationFailed};
|
||||
}
|
||||
|
||||
if (m_options.config_provider && (*next)->configure != nullptr) {
|
||||
const std::string config = m_options.config_provider(name);
|
||||
|
||||
Reference in new issue
Block a user