Browse Source

* repeater: reduce FS writes on login

pull/835/head
Scott Powell 10 months ago
parent
commit
76be66313e
  1. 2
      examples/simple_repeater/MyMesh.cpp

2
examples/simple_repeater/MyMesh.cpp

@ -115,8 +115,10 @@ uint8_t MyMesh::handleLoginReq(const mesh::Identity& sender, const uint8_t* secr
client->permissions |= perms; client->permissions |= perms;
memcpy(client->shared_secret, secret, PUB_KEY_SIZE); memcpy(client->shared_secret, secret, PUB_KEY_SIZE);
if (perms != PERM_ACL_GUEST) { // keep number of FS writes to a minimum
dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY); dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
} }
}
uint32_t now = getRTCClock()->getCurrentTimeUnique(); uint32_t now = getRTCClock()->getCurrentTimeUnique();
memcpy(reply_data, &now, 4); // response packets always prefixed with timestamp memcpy(reply_data, &now, 4); // response packets always prefixed with timestamp

Loading…
Cancel
Save