quitting communication with user on invalid packet receive

This commit is contained in:
Václav Šmejkal 2023-03-31 18:36:09 +02:00
parent 8d387df7d7
commit 0a1cb72f5d
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -318,6 +318,8 @@ void *why2_communicate_thread(void *arg)
//READ
raw = read_socket_raw(connection.connection);
if (raw == NULL) break; //QUIT COMMUNICATION IF INVALID PACKET WAS RECEIVED
//REMOVE CONTROL CHARACTERS FROM raw
for (size_t i = 0; i < strlen(raw); i++)
{