Clear oceanic clearance cache on flight plan updates to fix track display#602
Closed
MrAdder wants to merge 18 commits intoVATSIM-UK:mainfrom
Closed
Clear oceanic clearance cache on flight plan updates to fix track display#602MrAdder wants to merge 18 commits intoVATSIM-UK:mainfrom
MrAdder wants to merge 18 commits intoVATSIM-UK:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potentially Fixes #586
Currently unable to test this
Summary of Changes
Your changes fix an issue where assumed aircraft would show incorrect oceanic track information. The modifications improve the oceanic clearance caching mechanism by:
Files Modified:
src/plugin/oceanic/OceanicEventHandler.h - Header file
FlightPlanEventHandlerInterfaceOceanicEventHandlerinherit fromFlightPlanEventHandlerInterface(in addition to existing base classes)src/plugin/oceanic/OceanicEventHandler.cpp - Implementation file
UpdateOceanicClearances()methodFlightPlanEvent()- Clears cached clearance data when a flight plan is updated (including when an aircraft is assumed)FlightPlanDisconnectEvent()- Removes clearance from cache when a flight plan disconnectsControllerFlightPlanDataEvent()- Empty handler for controller flight plan data eventsTechnical Details:
The changes use thread-safe operations (
std::lock_guardwithclearanceMapMutex) to ensure cache consistency when clearing or removing oceanic clearances during flight plan lifecycle events.Issue Fixed:
When aircraft are assumed or their flight plans update, the oceanic clearance cache is now properly invalidated, ensuring fresh data is displayed on the next timer trigger rather than showing stale cached information.