first 3rdparty correction

This commit is contained in:
richonguzman 2024-06-24 10:32:58 -04:00
parent 35e79709e3
commit 7baa98bf7e
4 changed files with 81 additions and 75 deletions

View file

@ -62,7 +62,8 @@ namespace DIGI_Utils {
if ((packet.substring(0, 3) == "\x3c\xff\x01") && (packet.indexOf("NOGATE") == -1)) {
bool thirdPartyPacket = false;
String temp, Sender;
if (packet.indexOf("}") > 0 && packet.indexOf("TCPIP") > 0) { // 3rd Party
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 0 && packet[firstColonIndex + 1] == '}' && packet.indexOf("TCPIP") > 0) { // 3rd Party
thirdPartyPacket = true;
temp = packet.substring(packet.indexOf(":}") + 2);
Sender = temp.substring(0, temp.indexOf(">"));