enhanced the relatively new tmxr_linemsgf api to dynamically flush a completely full transmit buffer as needed.
This commit is contained in:
parent
d86680013b
commit
3448edf608
1 changed files with 6 additions and 4 deletions
10
sim_tmxr.c
10
sim_tmxr.c
|
@ -3104,11 +3104,13 @@ while (1) { /* format passed string, arg
|
|||
|
||||
for (i = 0; i < len; ++i) {
|
||||
if ('\n' == buf[i]) {
|
||||
tmxr_putc_ln (lp, '\r');
|
||||
tmxr_putc_ln (lp, buf[i]);
|
||||
while (SCPE_STALL == tmxr_putc_ln (lp, '\r'))
|
||||
if (lp->txbsz == tmxr_send_buffered_data (lp))
|
||||
sim_os_ms_sleep (10);
|
||||
}
|
||||
else
|
||||
tmxr_putc_ln (lp, buf[i]);
|
||||
while (SCPE_STALL == tmxr_putc_ln (lp, buf[i]))
|
||||
if (lp->txbsz == tmxr_send_buffered_data (lp))
|
||||
sim_os_ms_sleep (10);
|
||||
}
|
||||
if (buf != stackbuf)
|
||||
free (buf);
|
||||
|
|
Loading…
Add table
Reference in a new issue