clean up ack packets

This commit is contained in:
Kevin Hester
2021-02-26 20:36:22 +08:00
parent 0307e4161e
commit 989f52494d
8 changed files with 23 additions and 32 deletions

View File

@@ -93,8 +93,10 @@ void MeshPlugin::sendResponse(const MeshPacket &req) {
* This ensures that if the request packet was sent reliably, the reply is sent that way as well.
*/
void setReplyTo(MeshPacket *p, const MeshPacket &to) {
assert(p->which_payloadVariant == MeshPacket_decoded_tag); // Should already be set by now
p->to = to.from;
p->want_ack = to.want_ack;
p->decoded.request_id = to.id;
}
std::vector<MeshPlugin *> MeshPlugin::GetMeshPluginsWithUIFrames() {