oops - fix failed text message rx

This commit is contained in:
Kevin Hester
2021-03-06 14:21:20 +08:00
parent fbe56531d2
commit 49b1f4c5af
5 changed files with 38 additions and 17 deletions

View File

@@ -275,10 +275,11 @@ const char *Channels::getPrimaryName()
bool Channels::decryptForHash(ChannelIndex chIndex, ChannelHash channelHash)
{
if(chIndex > getNumChannels() || getHash(chIndex) != channelHash) {
DEBUG_MSG("Skipping channel %d due to invalid hash/index\n", chIndex);
// DEBUG_MSG("Skipping channel %d (hash %x) due to invalid hash/index, want=%x\n", chIndex, getHash(chIndex), channelHash);
return false;
}
else {
DEBUG_MSG("Using channel %d (hash 0x%x)\n", chIndex, channelHash);
setCrypto(chIndex);
return true;
}