Skip to content

Commit bc1c7a8

Browse files
committed
Address comments
1 parent a30e4c4 commit bc1c7a8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Mesh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
143143
// FUTURE: could send back multiple paths, using createPathReturn(), and let sender choose which to use(?)
144144

145145
if (self_id.isHashMatch(&dest_hash)) {
146-
// scan contacts DB, for all matching hashes of 'src_hash' (max 4 matches supported ATM)
146+
// scan contacts DB, for all matching hashes of 'src_hash' (max 8 matches supported ATM)
147147
int num = searchPeersByHash(&src_hash);
148148
// for each matching contact, try to decrypt data
149149
bool found = false;
@@ -277,7 +277,7 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
277277
if (i + 2 >= pkt->payload_len) {
278278
MESH_DEBUG_PRINTLN("%s Mesh::onRecvPacket(): incomplete data packet", getLogDateTime());
279279
} else if (!_tables->hasSeen(pkt)) {
280-
// scan channels DB, for all matching hashes of 'channel_hash' (max 4 matches supported ATM)
280+
// scan channels DB, for all matching hashes of 'channel_hash' (max 8 matches supported ATM)
281281
GroupChannel channels[4];
282282
int num = searchChannelsByHash(&channel_hash, channels, 4);
283283
// for each matching channel, try to decrypt data

src/helpers/BaseChatMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,9 @@ void BaseChatMesh::onSessionKeyDecryptSuccess(int peer_idx) {
13521352
if (changed) {
13531353
memset(entry->prev_session_key, 0, SESSION_KEY_SIZE);
13541354
entry->state = SESSION_STATE_ACTIVE;
1355+
onSessionKeysUpdated();
13551356
}
13561357
entry->sends_since_last_recv = 0;
1357-
if (changed) onSessionKeysUpdated();
13581358
}
13591359
}
13601360
}

0 commit comments

Comments
 (0)