Fix WG bug introduced in latest PR

This commit is contained in:
s-hadinger 2025-04-29 14:14:26 +02:00 committed by GitHub
parent 70bf5daff9
commit ce5fae934b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -287,11 +287,11 @@ bool Xdrv80(uint32_t function) {
WireguardLoop(); WireguardLoop();
break; break;
#ifdef USE_WEBSERVER #ifdef USE_WEBSERVER
case FUNC_WEB_STATUS: case FUNC_WEB_STATUS_RIGHT:
if (Wireguard.started && Wireguard.peer_status == 1) { if (Wireguard.started && Wireguard.peer_status == 1) {
// number of seconds since connection, or -1 if no valid time // number of seconds since connection, or -1 if no valid time
int32_t seconds = Wireguard.connected_since_utc ? Rtc.utc_time - Wireguard.connected_since_utc : -1; int32_t seconds = Wireguard.connected_since_utc ? Rtc.utc_time - Wireguard.connected_since_utc : -1;
WSContentStatusSticker(PSTR("VPN"), seconds); WSContentStatusSticker(PSTR("VPN"));
} }
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER