From 4bded7bbb4e40f049b3c51280b4d46fcbf24c954 Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 11 Nov 2024 19:52:44 +0100 Subject: [PATCH] make sta udp receiver working --- lib/socketserver/GwUdpReader.cpp | 2 +- web/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socketserver/GwUdpReader.cpp b/lib/socketserver/GwUdpReader.cpp index e8b619e..d7efbb9 100644 --- a/lib/socketserver/GwUdpReader.cpp +++ b/lib/socketserver/GwUdpReader.cpp @@ -120,7 +120,7 @@ void GwUdpReader::loop(bool handleRead, bool handleWrite) //only change anything if we considered the station IP String nextStationIp; if (WiFi.isConnected()){ - String nextStationIp=WiFi.localIP().toString(); + nextStationIp=WiFi.localIP().toString(); } if (setStationAdd(nextStationIp)){ LOG_INFO("UDPR: wifi client IP changed, restart"); diff --git a/web/index.js b/web/index.js index 6962506..a82f79e 100644 --- a/web/index.js +++ b/web/index.js @@ -229,7 +229,7 @@ if (!v.match(/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/)) return "must be in the form 224.0.0.1"; let parts=v.split("."); - let o1=parseInt(v[0]); + let o1=parseInt(parts[0]); if (o1 < 224 || o1 > 239) return "mulicast address must be in the range 224.0.0.0 to 239.255.255.255" }