-
Notifications
You must be signed in to change notification settings - Fork 243
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
Check waypoint subscription size in resumption #3684
Conversation
@@ -131,14 +131,19 @@ void SDLRPCPlugin::RevertResumption(application_manager::Application& app) { | |||
pending_resumption_handler_->OnResumptionRevert(); | |||
|
|||
if (application_manager_->IsAppSubscribedForWayPoints(app)) { | |||
application_manager_->UnsubscribeAppFromWayPoints(app.app_id()); | |||
if (!application_manager_->IsAnyAppSubscribedForWayPoints()) { | |||
std::set<uint32_t> subscribed_apps = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JackLivio probably good place for const auto
if (!application_manager_->IsAnyAppSubscribedForWayPoints()) { | ||
std::set<uint32_t> subscribed_apps = | ||
application_manager_->GetAppsSubscribedForWayPoints(); | ||
bool send_unsubscribe = subscribed_apps.size() <= 1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JackLivio const bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JackLivio do we really need to check "less than one"?
bool send_unsubscribe = subscribed_apps.size() <= 1 && | |
bool send_unsubscribe = subscribed_apps.size() == 1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Updated the modifiers, but I would suggest keeping <= for "safety".
Fixes #3683
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
See reproduction steps in issue #3683
Summary
Check size of waypoint subscription list before unsubscribing HMI from way points.
CLA