This commit is contained in:
Wolfgang Hottgenroth 2020-12-18 19:06:06 +01:00
parent cd58f5c9c2
commit 561e189c78

View File

@ -91,7 +91,7 @@ static int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetSpecialModes) {
commands = getConfigCommands(); commands = getConfigCommands();
} }
coloredMsg(LOG_YELLOW, false, "ch cec cmdLine is %s", cmdLine);; coloredMsg(LOG_YELLOW, true, "ch cec cmdLine is %s", cmdLine);;
#define MAX_NUM_OF_ARGS 8 #define MAX_NUM_OF_ARGS 8
char *args[MAX_NUM_OF_TASKS]; char *args[MAX_NUM_OF_TASKS];
@ -107,7 +107,7 @@ static int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetSpecialModes) {
char *cmd = args[0]; char *cmd = args[0];
int8_t retCode = 0; int8_t retCode = 0;
coloredMsg(LOG_YELLOW, false, "ch cec cmd is %s, number of arguments %d", cmd, argc); coloredMsg(LOG_YELLOW, true, "ch cec cmd is %s, number of arguments %d", cmd, argc);
if (0 == strcmp(cmd, "quit")) { if (0 == strcmp(cmd, "quit")) {
messageToSend = (uint8_t*)GOODBYE_MSG; messageToSend = (uint8_t*)GOODBYE_MSG;
@ -157,6 +157,7 @@ static int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetSpecialModes) {
} }
if (messageToSend) { if (messageToSend) {
coloredMsg(LOG_YELLOW, true, "ch cec command finally returns %s", messageToSend);
send(CMD_SOCK, messageToSend, strlen((char*)messageToSend)); send(CMD_SOCK, messageToSend, strlen((char*)messageToSend));
} }
@ -329,6 +330,9 @@ static void cmdHandlerEngine(void *handle) {
case CH_ERROR: case CH_ERROR:
coloredMsg(LOG_YELLOW, true, "ch che error state, will stop here"); coloredMsg(LOG_YELLOW, true, "ch che error state, will stop here");
schDel(cmdHandlerEngine, NULL); schDel(cmdHandlerEngine, NULL);
state = CH_INIT;
schAdd(cmdHandlerEngine, NULL, 5000, 100);
coloredMsg(LOG_YELLOW, true, "ch che restart command handler engine in 5s");
break; break;
} }
} }