"tests/unit/cluster/multi-slot-operations.tcl" did not exist on "9f8885760b53e6d3952b9c9b41f9e6c48dfa6cec"
Commit 452778ed authored by Johny Mattsson's avatar Johny Mattsson Committed by Arnim Läuger
Browse files

Fix batch multi-line UART input discarding all but first line (#2217)

* Only load a single non-empty line from the uart at a time.

* Don't fall behind in processing of uart buffer.
parent 05b0a013
...@@ -468,8 +468,11 @@ int lua_main (int argc, char **argv) { ...@@ -468,8 +468,11 @@ int lua_main (int argc, char **argv) {
void lua_handle_input (bool force) void lua_handle_input (bool force)
{ {
if (gLoad.L && (force || readline (&gLoad))) while (gLoad.L && (force || readline (&gLoad)))
{
dojob (&gLoad); dojob (&gLoad);
force = false;
}
} }
void donejob(lua_Load *load){ void donejob(lua_Load *load){
...@@ -599,11 +602,12 @@ static bool readline(lua_Load *load){ ...@@ -599,11 +602,12 @@ static bool readline(lua_Load *load){
{ {
/* Get a empty line, then go to get a new line */ /* Get a empty line, then go to get a new line */
c_puts(load->prmt); c_puts(load->prmt);
continue;
} else { } else {
load->done = 1; load->done = 1;
need_dojob = true; need_dojob = true;
break;
} }
continue;
} }
/* other control character or not an acsii character */ /* other control character or not an acsii character */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment