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 @@ -1184,7 +1184,7 @@ bool BaseChatMesh::shouldInitiateSessionKey(const ContactInfo& contact) {
11841184 if (!(contact.flags & CONTACT_FLAG_AEAD )) return false ;
11851185
11861186 // Need a known path to send the request
1187- if (contact.out_path_len < 0 ) return false ;
1187+ if (contact.out_path_len == OUT_PATH_UNKNOWN ) return false ;
11881188
11891189 auto entry = findSessionKey (contact.id .pub_key );
11901190
@@ -1419,9 +1419,9 @@ void BaseChatMesh::onSessionKeyDecryptSuccess(int peer_idx) {
14191419 if (changed) {
14201420 memset (entry->prev_session_key , 0 , SESSION_KEY_SIZE );
14211421 entry->state = SESSION_STATE_ACTIVE ;
1422+ onSessionKeysUpdated ();
14221423 }
14231424 entry->sends_since_last_recv = 0 ;
1424- if (changed) onSessionKeysUpdated ();
14251425 }
14261426 }
14271427}
You can’t perform that action at this time.
0 commit comments