Klaus Basan
2019-06-08 22:16:23 +02:00
committed by Mat Sutcliffe
parent 3510e20290
commit c9846f45ee

View File

@@ -303,7 +303,11 @@ namespace BlackCore
QByteArray CNetworkVatlib::toFSDnoColon(const QString &qstr) const QByteArray CNetworkVatlib::toFSDnoColon(const QString &qstr) const
{ {
if (!qstr.contains(':')) { return toFSD(qstr); } if (!qstr.contains(':')) { return toFSD(qstr); }
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Illegal char :"); if (CBuildConfig::isLocalDeveloperDebugBuild())
{
// so we can investigate
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Illegal char :");
}
QString copy(qstr); QString copy(qstr);
return toFSD(copy.remove(':')); return toFSD(copy.remove(':'));
} }
@@ -719,7 +723,7 @@ namespace BlackCore
void CNetworkVatlib::replyToNameQuery(const CCallsign &callsign) // private void CNetworkVatlib::replyToNameQuery(const CCallsign &callsign) // private
{ {
QStringList response { m_server.getUser().getRealNameAndHomeBase(), "" }; QStringList response { removeColon(m_server.getUser().getRealNameAndHomeBase()), "" };
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryName, toFSD(callsign), toFSD(response)(), response.size()); Vat_SendClientQueryResponse(m_net.data(), vatClientQueryName, toFSD(callsign), toFSD(response)(), response.size());
} }
@@ -1340,6 +1344,10 @@ namespace BlackCore
{ {
QPointer<CNetworkVatlib> self(cbvar_cast(cbvar)); QPointer<CNetworkVatlib> self(cbvar_cast(cbvar));
const CCallsign callsign(self->fromFSD(callsignString)); const CCallsign callsign(self->fromFSD(callsignString));
const bool valid = !callsign.isEmpty();
BLACK_AUDIT_X(valid, Q_FUNC_INFO, "No callsign");
if (!valid) { return; }
switch (type) switch (type)
{ {
case vatClientQueryFreq: case vatClientQueryFreq: