FwUpdate binary: cap the missing-units reply at 150 B (companion frame limit); ota_mesh_push --text
This commit is contained in:
1 parent
637b0d78b7
commit
4813340a69
2 files changed
+8
-2
No files matched your search
@@ -481,7 +481,10 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t
|
||||
// only, helpers/FwUpdate.h). 0 = no reply: chunks are fire and forget.
|
||||
if (payload_len >= 1 && payload[0] == 0xF0) {
|
||||
extern int maintHandleRequest(bool admin, const uint8_t* req, int len, uint8_t* reply, int reply_max);
|
||||
int n = maintHandleRequest(sender->isAdmin(), payload, (int)payload_len, &reply_data[4], 160);
|
||||
// 150: tag + reply pads to 160 B, and the companion's push frame (6 + padded
|
||||
// length - 4) must stay within MAX_FRAME_SIZE 176 -- a 163 B reply padded to
|
||||
// 176 made a 178 B frame that the companion silently dropped
|
||||
int n = maintHandleRequest(sender->isAdmin(), payload, (int)payload_len, &reply_data[4], 150);
|
||||
return n > 0 ? 4 + n : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,10 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t
|
||||
// only, helpers/FwUpdate.h). 0 = no reply: chunks are fire and forget.
|
||||
if (payload_len >= 1 && payload[0] == 0xF0) {
|
||||
extern int maintHandleRequest(bool admin, const uint8_t* req, int len, uint8_t* reply, int reply_max);
|
||||
int n = maintHandleRequest(sender->isAdmin(), payload, (int)payload_len, &reply_data[4], 160);
|
||||
// 150: tag + reply pads to 160 B, and the companion's push frame (6 + padded
|
||||
// length - 4) must stay within MAX_FRAME_SIZE 176 -- a 163 B reply padded to
|
||||
// 176 made a 178 B frame that the companion silently dropped
|
||||
int n = maintHandleRequest(sender->isAdmin(), payload, (int)payload_len, &reply_data[4], 150);
|
||||
return n > 0 ? 4 + n : 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user