mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* companion: disabled processing/sending of keep_alive packets (deprecated)
* FIRMWARE_VER_LEVEL now moved to end of response payloads
This commit is contained in:
parent
e988531f6a
commit
a5af1b5bcd
4 changed files with 12 additions and 10 deletions
|
|
@ -123,12 +123,13 @@ uint8_t MyMesh::handleLoginReq(const mesh::Identity& sender, const uint8_t* secr
|
|||
uint32_t now = getRTCClock()->getCurrentTimeUnique();
|
||||
memcpy(reply_data, &now, 4); // response packets always prefixed with timestamp
|
||||
reply_data[4] = RESP_SERVER_LOGIN_OK;
|
||||
reply_data[5] = FIRMWARE_VER_LEVEL; // Legacy: was recommended keep-alive interval (secs / 16)
|
||||
reply_data[5] = 0; // Legacy: was recommended keep-alive interval (secs / 16)
|
||||
reply_data[6] = client->isAdmin() ? 1 : 0;
|
||||
reply_data[7] = client->permissions;
|
||||
getRNG()->random(&reply_data[8], 4); // random blob to help packet-hash uniqueness
|
||||
reply_data[12] = FIRMWARE_VER_LEVEL; // New field
|
||||
|
||||
return 12; // reply length
|
||||
return 13; // reply length
|
||||
}
|
||||
|
||||
int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t *payload, size_t payload_len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue