mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +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:
@@ -1070,9 +1070,12 @@ namespace BlackCore
|
||||
{
|
||||
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
||||
this->storeAircraftParts(callsign, jsonObject, currentOffsetMs);
|
||||
BLACK_AUDIT_X(!callsign.isEmpty(), Q_FUNC_INFO, "Need callsign");
|
||||
if (callsign.isEmpty()) { return; }
|
||||
|
||||
// update client capability
|
||||
CClient client = this->getClientOrDefaultForCallsign(callsign);
|
||||
client.setUserCallsign(callsign); // make valid by setting a callsign
|
||||
if (client.hasCapability(CClient::FsdWithAircraftConfig)) { return; }
|
||||
client.addCapability(CClient::FsdWithAircraftConfig);
|
||||
this->setOtherClient(client);
|
||||
|
||||
Reference in New Issue
Block a user