mirror of
https://github.com/simh/simh.git
synced 2026-05-04 15:05:39 +00:00
Fixed Buffered Console behavior which ended up flushing buffer contents once a second and clearing the buffer. We were also incorrectly flushing buffer contents when a connection dropped.
This commit is contained in:
@@ -186,7 +186,8 @@ if ((sim_con_tmxr.master == 0) && /* not Telnet and not se
|
|||||||
if (tmxr_poll_conn (&sim_con_tmxr) >= 0) /* poll connect */
|
if (tmxr_poll_conn (&sim_con_tmxr) >= 0) /* poll connect */
|
||||||
sim_con_ldsc.rcve = 1; /* rcv enabled */
|
sim_con_ldsc.rcve = 1; /* rcv enabled */
|
||||||
sim_activate_after(uptr, 1000000); /* check again in 1 second */
|
sim_activate_after(uptr, 1000000); /* check again in 1 second */
|
||||||
tmxr_send_buffered_data (&sim_con_ldsc); /* try to flush any buffered data */
|
if (sim_con_ldsc.conn)
|
||||||
|
tmxr_send_buffered_data (&sim_con_ldsc); /* try to flush any buffered data */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1142,7 +1142,8 @@ for (i = 0; i < mp->lines; i++) { /* loop thru lines */
|
|||||||
TMXR_MAXBUF - lp->rxbpi);
|
TMXR_MAXBUF - lp->rxbpi);
|
||||||
|
|
||||||
if (nbytes < 0) { /* line error? */
|
if (nbytes < 0) { /* line error? */
|
||||||
lp->txbpi = lp->txbpr = 0; /* Drop the data we already know we can't send */
|
if (!lp->txbfd)
|
||||||
|
lp->txbpi = lp->txbpr = 0; /* Drop the data we already know we can't send */
|
||||||
tmxr_close_ln (lp); /* disconnect line */
|
tmxr_close_ln (lp); /* disconnect line */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user