Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vehicle data params after master reset #2614

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,26 @@ class PolicyHandler : public PolicyHandlerInterface,
void GetRegisteredLinks(std::map<std::string, std::string>& out_links) const;

private:
mutable sync_primitives::RWLock policy_manager_lock_;
mutable sync_primitives::RecursiveLock policy_manager_lock_;
std::shared_ptr<PolicyManager> policy_manager_;
void* dl_handle_;
std::shared_ptr<PolicyEventObserver> event_observer_;
uint32_t last_activated_app_id_;

/**
* @brief Call PolicyManager function with sync_primitives::AutoLock
* @param func function PolicyManager to call
* @param args arguments for call function
* @return result PolicyManager function
*/
template <typename Func, typename... Args>
auto CallPolicyManagerFunction(Func func, Args&&... args) const
-> decltype((std::declval<PolicyManager>().*
std::declval<Func>())(std::declval<Args>()...)) {
sync_primitives::AutoLock lock(policy_manager_lock_);
return ((*policy_manager_).*func)(args...);
}

/**
* @brief Contains device handles, which were sent for user consent to HMI
*/
Expand Down
Loading