fix(core): a flood DM's ACK folded into the return path reaches the UI

The base class matched an ACK carried in a PATH packet without going
through onAckRecv(), so the device UI's delivery marker never saw it and
kept resending the DM until a plain ACK arrived. MyMesh now passes it on
to the listener as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-02 11:25:58 +02:00
co-authored by Claude Opus 5.5
parent 0f635c0171
commit 1166ea8dde
+11 -1
View File
@@ -1360,7 +1360,17 @@ bool MyMesh::onContactPathRecv(ContactInfo& contact, uint8_t* in_path, uint8_t i
}
}
// let base class handle received path and data
return BaseChatMesh::onContactPathRecv(contact, in_path, in_path_len, out_path, out_path_len, extra_type, extra, extra_len);
bool r = BaseChatMesh::onContactPathRecv(contact, in_path, in_path_len, out_path, out_path_len, extra_type, extra, extra_len);
// A flood DM's ACK comes back folded into the return path, which the base
// class matches without going through onAckRecv() -- so the UI's delivery
// marker never heard of it and kept resending. Tell it here too; it only
// acts on a crc matching one of its own pending DMs.
if (extra_type == PAYLOAD_TYPE_ACK && extra_len >= 4 && _listener) {
uint32_t ack_crc;
memcpy(&ack_crc, extra, 4);
_listener->onACKRecv(ack_crc);
}
return r;
}
#define CTL_TYPE_NODE_DISCOVER_REQ 0x80