added command handling to why2_communicate_thread

This commit is contained in:
Václav Šmejkal 2023-02-23 09:05:16 +01:00
parent 6e746b020b
commit 6fbbee7b68
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59

View File

@ -162,7 +162,12 @@ void *why2_communicate_thread(void *arg)
if (received == NULL) return NULL; //FAILED; EXIT THREAD if (received == NULL) return NULL; //FAILED; EXIT THREAD
if (strcmp(received, "!exit\n") == 0) break; //USER REQUESTED PROGRAM EXIT if (received[0] == '!') //COMMANDS
{
if (strcmp(received, "!exit\n") == 0) break; //USER REQUESTED EXIT
continue; //IGNORE MESSAGES BEGINNING WITH '!'
}
printf("Received:\n%s\n\n", received); printf("Received:\n%s\n\n", received);