Fixed a recently introduced bug that allowed sending receiving station reports to PSK Reporter when PSK Reporter was disabled.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3589 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Edson W. R. Pereira 2013-10-04 20:02:48 +00:00
parent 833eaf9eef
commit 19cdb496dc

View File

@ -62,6 +62,10 @@ void PSK_Reporter::addRemoteStation(QString call, QString grid, QString freq, QS
void PSK_Reporter::sendReport() void PSK_Reporter::sendReport()
{ {
if (m_spotQueue.isEmpty()) {
return;
}
QString report_h; QString report_h;
// Header // Header
@ -80,7 +84,6 @@ void PSK_Reporter::sendReport()
rxInfoData_h.replace("50E2llll", "50E2" + QString("%1").arg(rxInfoData_h.length()/2,4,16,QChar('0'))); rxInfoData_h.replace("50E2llll", "50E2" + QString("%1").arg(rxInfoData_h.length()/2,4,16,QChar('0')));
// Sender information // Sender information
if (! m_spotQueue.isEmpty()) {
QString txInfoData_h = "50E3llll"; QString txInfoData_h = "50E3llll";
while (!m_spotQueue.isEmpty()) { while (!m_spotQueue.isEmpty()) {
QHash<QString,QString> spot = m_spotQueue.dequeue(); QHash<QString,QString> spot = m_spotQueue.dequeue();
@ -96,10 +99,6 @@ void PSK_Reporter::sendReport()
txInfoData_h.replace("50E3llll", "50E3" + QString("%1").arg(txInfoData_h.length()/2,4,16,QChar('0'))); txInfoData_h.replace("50E3llll", "50E3" + QString("%1").arg(txInfoData_h.length()/2,4,16,QChar('0')));
report_h = header_h + m_rxInfoDescriptor_h + m_txInfoDescriptor_h + rxInfoData_h + txInfoData_h; report_h = header_h + m_rxInfoDescriptor_h + m_txInfoDescriptor_h + rxInfoData_h + txInfoData_h;
//qDebug() << "Sending Report TX: "; //qDebug() << "Sending Report TX: ";
} else {
report_h = header_h + m_rxInfoDescriptor_h + rxInfoData_h;
//qDebug() << "Sending Report RX: ";
}
report_h.replace("000Allll", "000A" + QString("%1").arg(report_h.length()/2,4,16,QChar('0'))); report_h.replace("000Allll", "000A" + QString("%1").arg(report_h.length()/2,4,16,QChar('0')));
QByteArray report = QByteArray::fromHex(report_h.toUtf8()); QByteArray report = QByteArray::fromHex(report_h.toUtf8());