mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 06:19:55 +00:00
self-limiting handlers fix
This commit is contained in:
@@ -1030,11 +1030,17 @@ void RoomServerMesh::handleCommand(uint32_t sender_timestamp, char* command, cha
|
||||
|
||||
while (*command == ' ') command++;
|
||||
|
||||
uint8_t hdr_used = 0;
|
||||
if (strlen(command) > 4 && command[2] == '|') {
|
||||
memcpy(reply, command, 3);
|
||||
reply += 3;
|
||||
command += 3;
|
||||
hdr_used = 3;
|
||||
}
|
||||
/* Tell the shared CLI how much of the caller's buffer is already spent, so
|
||||
* the self-limiting handlers do not write past temp[5 + CLI_REMOTE_REPLY_SIZE].
|
||||
* Set unconditionally: a stale value would shrink the next reply. */
|
||||
_cli.setReplyHeaderUsed(hdr_used);
|
||||
|
||||
// ACL commands - supports BOTH formats for app compatibility:
|
||||
// Old Arduino: setperm {pubkey-hex} {permissions} (pubkey is long, perms is short)
|
||||
|
||||
Reference in New Issue
Block a user