Skip to content

Commit

Permalink
Accept rejected or invalid transmissions as being 'in' despite not being
Browse files Browse the repository at this point in the history
relayed. Also give extra headroom on the convolution decoders.
  • Loading branch information
g4klx committed Jun 25, 2021
1 parent a8fe55a commit 5033763
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions DStarControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ bool CDStarControl::writeModem(unsigned char *data, unsigned int len)
return false;
} else if (type == TAG_DATA1) {
if (m_rfState == RS_RF_REJECTED) {
return false;
return true;
} else if (m_rfState == RS_RF_INVALID) {
return false;
return true;
} else if (m_rfState == RS_RF_LISTENING) {
// The sync is regenerated by the modem so can do exact match
if (::memcmp(data + 1U + DSTAR_VOICE_FRAME_LENGTH_BYTES, DSTAR_SYNC_BYTES, DSTAR_DATA_FRAME_LENGTH_BYTES) == 0) {
Expand Down
4 changes: 2 additions & 2 deletions M17Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ bool CM17Control::processRFHeader(bool lateEntry)
if (type != M17_ENCRYPTION_TYPE_NONE) {
LogMessage("M17, access attempt with encryption from %s to %s", source.c_str(), dest.c_str());
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand All @@ -563,7 +563,7 @@ bool CM17Control::processRFHeader(bool lateEntry)
if (!ret) {
LogMessage("M17, invalid access attempt from %s to %s", source.c_str(), dest.c_str());
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down
4 changes: 2 additions & 2 deletions M17Convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ m_newMetrics(NULL),
m_decisions(NULL),
m_dp(NULL)
{
m_metrics1 = new uint16_t[16U];
m_metrics2 = new uint16_t[16U];
m_metrics1 = new uint16_t[20U];
m_metrics2 = new uint16_t[20U];
m_decisions = new uint64_t[300U];
}

Expand Down
4 changes: 2 additions & 2 deletions NXDNControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne
unsigned short srcId = layer3.getSourceUnitId();
if (srcId != m_id) {
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}
} else {
Expand Down Expand Up @@ -375,7 +375,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne
if (m_selfOnly) {
if (srcId != m_id) {
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down
4 changes: 2 additions & 2 deletions NXDNConvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ m_newMetrics(NULL),
m_decisions(NULL),
m_dp(NULL)
{
m_metrics1 = new uint16_t[16U];
m_metrics2 = new uint16_t[16U];
m_metrics1 = new uint16_t[20U];
m_metrics2 = new uint16_t[20U];
m_decisions = new uint64_t[300U];
}

Expand Down
2 changes: 1 addition & 1 deletion Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H

const char* VERSION = "20210618";
const char* VERSION = "20210625";

#endif
8 changes: 4 additions & 4 deletions YSFControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
if (!ret) {
LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid);
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down Expand Up @@ -402,7 +402,7 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
if (!ret) {
LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid);
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down Expand Up @@ -598,7 +598,7 @@ bool CYSFControl::processDNData(bool valid, unsigned char *data)
if (!ret) {
LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid);
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down Expand Up @@ -704,7 +704,7 @@ bool CYSFControl::processFRData(bool valid, unsigned char *data)
if (!ret) {
LogMessage("YSF, invalid access attempt from %10.10s to DG-ID %u", m_rfSource, dgid);
m_rfState = RS_RF_REJECTED;
return false;
return true;
}
}

Expand Down
4 changes: 2 additions & 2 deletions YSFConvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ m_newMetrics(NULL),
m_decisions(NULL),
m_dp(NULL)
{
m_metrics1 = new uint16_t[16U];
m_metrics2 = new uint16_t[16U];
m_metrics1 = new uint16_t[20U];
m_metrics2 = new uint16_t[20U];
m_decisions = new uint64_t[180U];
}

Expand Down

0 comments on commit 5033763

Please sign in to comment.