Correct a factor of two error in Pskreporter UDP message sizing

Data is built  as a hexadecmal string,  so is twice the  length of the
message bytes it is encoded as.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8344 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2017-12-18 23:04:17 +00:00
parent 71a395c1c2
commit c9b0ef9d7a

View File

@ -94,7 +94,7 @@ void PSK_Reporter::sendReport()
// Sender information // Sender information
QString txInfoData_h = "50E3llll"; QString txInfoData_h = "50E3llll";
while (!m_spotQueue.isEmpty() while (!m_spotQueue.isEmpty()
&& header_h.size () + m_rxInfoDescriptor_h.size () + m_txInfoDescriptor_h.size () + rxInfoData_h.size () + txInfoData_h.size () < MAX_PAYLOAD_LENGTH) { && (header_h.size () + m_rxInfoDescriptor_h.size () + m_txInfoDescriptor_h.size () + rxInfoData_h.size () + txInfoData_h.size ()) / 2 < MAX_PAYLOAD_LENGTH) {
QHash<QString,QString> spot = m_spotQueue.dequeue(); QHash<QString,QString> spot = m_spotQueue.dequeue();
txInfoData_h += QString("%1").arg(spot["call"].length(),2,16,QChar('0')) + spot["call"].toUtf8().toHex(); txInfoData_h += QString("%1").arg(spot["call"].length(),2,16,QChar('0')) + spot["call"].toUtf8().toHex();
txInfoData_h += QString("%1").arg(spot["freq"].toLongLong(),8,16,QChar('0')); txInfoData_h += QString("%1").arg(spot["freq"].toLongLong(),8,16,QChar('0'));