mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user