BLE improvements

This commit is contained in:
iranl
2025-07-02 21:24:17 +02:00
parent cac2ca9a60
commit 3480e1a94f
3 changed files with 9 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
#define NUKI_HUB_VERSION "9.12"
#define NUKI_HUB_VERSION_INT (uint32_t)912
#define NUKI_HUB_BUILD "unknownbuildnr"
#define NUKI_HUB_DATE "2025-06-30"
#define NUKI_HUB_DATE "2025-07-02"
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"

View File

@@ -128,8 +128,13 @@ bool WebCfgServer::isAuthenticated(PsychicRequest *request, int type)
{
struct timeval time;
gettimeofday(&time, NULL);
int64_t time_us = (int64_t)time.tv_sec * 1000000L + (int64_t)time.tv_usec;
int64_t time_us = 0;
if (timeSynced)
{
time_us = (int64_t)time.tv_sec * 1000000L + (int64_t)time.tv_usec;
}
if ((type == 0 && _httpSessions[cookie].as<signed long long>() > time_us) || (type == 1 && _importExport->_duoSessions[cookie].as<signed long long>() > time_us) || (type == 2 && _importExport->_totpSessions[cookie].as<signed long long>() > time_us) || (type == 3 && _importExport->_bypassSessions[cookie].as<signed long long>() > time_us))
{
return true;