Add even more debugging.

This commit is contained in:
Jonathan Naylor
2023-12-06 14:06:48 +00:00
parent 08ccf148ad
commit 333757829f
3 changed files with 20 additions and 6 deletions

View File

@@ -539,10 +539,13 @@ void CM17Control::writeNetwork()
if (!exists)
return;
if (!m_enabled)
if (!m_enabled) {
LogMessage("M17 not enabled");
return;
}
if (m_rfState != RS_RF_LISTENING && m_rfState != RS_RF_LATE_ENTRY && m_netState == RS_NET_IDLE) {
LogMessage("M17 status is incorrect %d,%d", m_rfState, m_netState);
m_network->reset();
return;
}
@@ -552,6 +555,7 @@ void CM17Control::writeNetwork()
if (!m_allowEncryption) {
unsigned char type = m_netLSF.getEncryptionType();
if (type != M17_ENCRYPTION_TYPE_NONE) {
LogMessage("M17 encryption rejection");
m_network->reset();
return;
}
@@ -616,6 +620,8 @@ void CM17Control::writeNetwork()
decorrelator(temp, start + 2U);
writeQueueNet(start);
} else {
LogMessage("M17 in an odd state 1 %d", m_netState);
}
if (m_netState == RS_NET_AUDIO || m_netState == RS_NET_DATA_AUDIO) {
@@ -728,6 +734,8 @@ void CM17Control::writeNetwork()
writeEndNet();
}
} else {
LogMessage("M17 in an odd state 2 %d", m_netState);
}
}