Allow sender or receiver to be 0xe1 in server

half-duplex
Phil Taylor 2021-06-09 09:24:20 +01:00
rodzic b5676b7773
commit 7e40f7faf0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1254,7 +1254,7 @@ void udpServer::dataForServer(QByteArray d)
int lastFE = d.lastIndexOf((quint8)0xfe);
if (client != Q_NULLPTR && client->connected && d.length() > lastFE + 2 &&
((quint8)d[lastFE + 1] == client->civId || (quint8)d[lastFE + 2] == client->civId ||
(quint8)d[lastFE + 1] == 0x00 || (quint8)d[lastFE + 2]==0x00 || (quint8)d[lastFE+2]==0xE1)) {
(quint8)d[lastFE + 1] == 0x00 || (quint8)d[lastFE + 2]==0x00 || (quint8)d[lastFE + 1] == 0xE1 || (quint8)d[lastFE + 2] == 0xE1)) {
data_packet p;
memset(p.packet, 0x0, sizeof(p)); // We can't be sure it is initialized with 0x00!
p.len = (quint16)d.length() + sizeof(p);