mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Stop any response from any mode when not enabled.
This commit is contained in:
@@ -121,6 +121,9 @@ bool CDStarControl::writeModem(unsigned char *data, unsigned int len)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
if (!m_enabled)
|
||||
return false;
|
||||
|
||||
unsigned char type = data[0U];
|
||||
|
||||
if (type == TAG_LOST && (m_rfState == RS_RF_AUDIO || m_rfState == RS_RF_DATA)) {
|
||||
@@ -622,6 +625,9 @@ void CDStarControl::writeNetwork()
|
||||
if (length == 0U)
|
||||
return;
|
||||
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
if ((m_rfState == RS_RF_AUDIO || m_rfState == RS_RF_DATA) && m_netState == RS_NET_IDLE)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user