telnet & http server send command to stdin of console

The NVS commands must be executed using an internal stack, so push all keyboard-like inputs to the console
This commit is contained in:
Philippe G
2021-11-24 23:15:13 -08:00
parent 4943df2ec7
commit ada74ab127
5 changed files with 118 additions and 81 deletions

View File

@@ -508,7 +508,8 @@ esp_err_t console_cmd_post_handler(httpd_req_t *req){
}
else{
// navigate to the first child of the config structure
if(run_command(cJSON_GetStringValue(item))!=ESP_OK){
char *cmd = cJSON_GetStringValue(item);
if(!console_push(cmd, strlen(cmd) + 1)){
httpd_resp_send(req, (const char *)failed, strlen(failed));
}
else {