Repeater, room server, sensor: guests no longer cause a flash write per request
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84f6fa03b2
commit
de92ca9ba2
5 files changed
+26
-13
No files matched your search
@@ -160,6 +160,11 @@ void ClientACL::orphanTimestamp(const ClientInfo* c) {
|
||||
}
|
||||
|
||||
void ClientACL::persistTimestamp(ClientInfo* c, uint32_t sender_timestamp, uint32_t now) {
|
||||
// Admins only. A guest can only read, and anybody gets in as one when the
|
||||
// guest password is empty (the default): its every request would be a flash
|
||||
// write, and its floors would push the admins' out of the orphan list. Its
|
||||
// floor stays in RAM, as upstream.
|
||||
if (!c->isAdmin()) return;
|
||||
if (sender_timestamp <= c->saved_timestamp) return; // retry, or nothing new
|
||||
if (sender_timestamp > now + ACL_TS_MAX_AHEAD) return; // runaway sender clock
|
||||
c->saved_timestamp = sender_timestamp;
|
||||
|
||||
Reference in new issue
Block a user