-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
shell_putc()
calls both shell_writer(
) and obhandle->shell_bwriter()
if both are not 0. This results in chars being printed twice, once by each writer. There is no way to avoid this condition when using buffered output, since shell_writer()
is required by shell_init()
and there's no way to undefined it.
Steps to reproduce:
--Initialize the shell as in the Shell_Basic example
--Add a buffered writer, something like:
void shell_buffered_writer(char* buffer, uint8_t count)
{
// If we can write to a client
if(client==true && client.connected())
{
client.write(buffer, count);
}
}
--Write enough output with shell_print()
to trigger a buffered write
--Observe that the output is written twice
Proposed solution:
Rework the if
statements in shell_putc()
so that only one writer is called
Metadata
Metadata
Assignees
Labels
No labels