various small fixes

- clean up webproxy getExtUrl
- bugfix init multicast on wifi reconnect
- add ip address of remote AP that's taken over a tag
- renamed button 'edit contentFS' to 'file system'
This commit is contained in:
Nic Limper
2023-08-23 01:29:52 +02:00
parent 034521682c
commit 79efe473bf
10 changed files with 12 additions and 44 deletions

View File

@@ -43,6 +43,7 @@ void UDPcomm::init() {
void UDPcomm::processPacket(AsyncUDPPacket packet) {
if (config.runStatus == RUNSTATUS_STOP) return;
IPAddress senderIP = packet.remoteIP();
switch (packet.data()[0]) {
case PKT_AVAIL_DATA_INFO: {
@@ -70,12 +71,10 @@ void UDPcomm::processPacket(AsyncUDPPacket packet) {
pendingData pending;
memset(&pending, 0, sizeof(pendingData));
memcpy(&pending, &packet.data()[1], std::min(packet.length() - 1, sizeof(pendingData)));
prepareExternalDataAvail(&pending, packet.remoteIP());
prepareExternalDataAvail(&pending, senderIP);
break;
}
case PKT_APLIST_REQ: {
IPAddress senderIP = packet.remoteIP();
APlist APitem;
APitem.src = WiFi.localIP();
strcpy(APitem.alias, config.alias);
@@ -103,10 +102,10 @@ void UDPcomm::processPacket(AsyncUDPPacket packet) {
case PKT_TAGINFO: {
uint16_t syncversion = (packet.data()[2] << 8) | packet.data()[1];
if (syncversion != SYNC_VERSION) {
wsErr("Got a packet from " + packet.remoteIP().toString() + " with mismatched udp sync version. Update firmware!");
wsErr("Got a packet from " + senderIP.toString() + " with mismatched udp sync version. Update firmware!");
} else {
TagInfo* taginfoitem = (TagInfo*)&packet.data()[1];
updateTaginfoitem(taginfoitem);
updateTaginfoitem(taginfoitem, senderIP);
}
}
}