From c9b0ef9d7a12cebfe69aded2b76c19624ef071bf Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 18 Dec 2017 23:04:17 +0000 Subject: [PATCH] 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 --- psk_reporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psk_reporter.cpp b/psk_reporter.cpp index fdf54afd2..b68a9c344 100644 --- a/psk_reporter.cpp +++ b/psk_reporter.cpp @@ -94,7 +94,7 @@ void PSK_Reporter::sendReport() // Sender information QString txInfoData_h = "50E3llll"; 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 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["freq"].toLongLong(),8,16,QChar('0'));