Skip to content

Commit

Permalink
Fixing get_policy_manager error with security disabled
Browse files Browse the repository at this point in the history
The getter would try to access a policy_manager that is unavailable
when using the VSOMEIP_DISABLE_SECURITY flag.
It now returns an empty policy_manager object.
  • Loading branch information
Duarte Fonseca authored and fcmonteiro committed Oct 3, 2024
1 parent 68ceb41 commit 9dd74ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions implementation/runtime/src/application_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,11 @@ std::shared_ptr<configuration> application_impl::get_configuration() const {
}

std::shared_ptr<policy_manager> application_impl::get_policy_manager() const {
#ifndef VSOMEIP_DISABLE_SECURITY
return configuration_->get_policy_manager();
#endif
VSOMEIP_WARNING << __func__ << ": manager is not available when security is disabled.";
return {};
}

diagnosis_t application_impl::get_diagnosis() const {
Expand Down

0 comments on commit 9dd74ec

Please sign in to comment.