File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
138138 // FUTURE: could send back multiple paths, using createPathReturn(), and let sender choose which to use(?)
139139
140140 if (self_id.isHashMatch (&dest_hash)) {
141- // scan contacts DB, for all matching hashes of 'src_hash' (max 4 matches supported ATM)
141+ // scan contacts DB, for all matching hashes of 'src_hash' (max 8 matches supported ATM)
142142 int num = searchPeersByHash (&src_hash);
143143 // for each matching contact, try to decrypt data
144144 bool found = false ;
@@ -274,7 +274,7 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
274274 if (i + 2 >= pkt->payload_len ) {
275275 MESH_DEBUG_PRINTLN (" %s Mesh::onRecvPacket(): incomplete data packet" , getLogDateTime ());
276276 } else if (!_tables->hasSeen (pkt)) {
277- // scan channels DB, for all matching hashes of 'channel_hash' (max 4 matches supported ATM)
277+ // scan channels DB, for all matching hashes of 'channel_hash' (max 8 matches supported ATM)
278278 GroupChannel channels[4 ];
279279 int num = searchChannelsByHash (&channel_hash, channels, 4 );
280280 // for each matching channel, try to decrypt data
Original file line number Diff line number Diff line change @@ -1188,7 +1188,7 @@ bool BaseChatMesh::shouldInitiateSessionKey(const ContactInfo& contact) {
11881188 if (!(contact.flags & CONTACT_FLAG_AEAD )) return false ;
11891189
11901190 // Need a known path to send the request
1191- if (contact.out_path_len < 0 ) return false ;
1191+ if (contact.out_path_len == OUT_PATH_UNKNOWN ) return false ;
11921192
11931193 auto entry = findSessionKey (contact.id .pub_key );
11941194
@@ -1423,9 +1423,9 @@ void BaseChatMesh::onSessionKeyDecryptSuccess(int peer_idx) {
14231423 if (changed) {
14241424 memset (entry->prev_session_key , 0 , SESSION_KEY_SIZE );
14251425 entry->state = SESSION_STATE_ACTIVE ;
1426+ onSessionKeysUpdated ();
14261427 }
14271428 entry->sends_since_last_recv = 0 ;
1428- if (changed) onSessionKeysUpdated ();
14291429 }
14301430 }
14311431}
You can’t perform that action at this time.
0 commit comments