Ref T632, mix fixes

* avoid empty callsign CClient object (harmless, but stupid)
* better validations in client provider
* check aircraft config packets (really broadcasts)
This commit is contained in:
Klaus Basan
2019-04-24 13:38:00 +02:00
parent eb89273104
commit a1490fd4e0
3 changed files with 29 additions and 5 deletions

View File

@@ -402,9 +402,14 @@ namespace BlackMisc
{
const CSimulatedAircraft remoteAircraft(this->getAircraftInRangeForCallsign(callsign));
const bool isFull = jsonObject.value(CAircraftParts::attributeNameIsFullJson()).toBool();
const bool validCs = remoteAircraft.hasValidCallsign();
if (!validCs)
{
if (!isFull) { return; } // incremental parts broadcasting
return; // suspicious
}
// If we are not yet synchronized, we throw away any incremental packet
if (!remoteAircraft.hasValidCallsign()) { return; }
if (!remoteAircraft.isPartsSynchronized() && !isFull) { return; }
CAircraftParts parts;