Passing connection status to airspace monitor.

When the network connection is terminated, airspace monitor
can still recevice pending signals from vatlib. Those have to be ignored.

Otherwise it can happen aircraft (.. etc.) are added again to airspace,
which gives inconsistent results.
This commit is contained in:
Klaus Basan
2015-02-24 14:53:40 +01:00
parent 688b89e313
commit 7e39587226
3 changed files with 29 additions and 8 deletions

View File

@@ -99,6 +99,9 @@ namespace BlackCore
//! Clear the contents
void clear();
//! Connection status
void setConnected(bool connected);
//! Request to update other clients' data from the network
void requestDataUpdates();
@@ -173,6 +176,7 @@ namespace BlackCore
CAirspaceWatchdog m_atcWatchdog;
CAirspaceWatchdog m_aircraftWatchdog;
bool m_serverSupportsNameQuery = false; //!< not all servers support name query
bool m_connected = false; //!< retrieve data
// TODO FIXME (MS) should be in INetwork
void sendFsipiCustomPacket(const BlackMisc::Aviation::CCallsign &recipientCallsign) const;