Fixed duplicate logging output when output buffers are full and potential pauses in console output (reported by Mark Benson)

This commit is contained in:
Mark Pizzolato 2012-12-15 11:40:20 -08:00
parent d955c383e9
commit 6cabdb9f9f
2 changed files with 3 additions and 4 deletions

View file

@ -185,8 +185,7 @@ if (sim_con_tmxr.master == 0) /* not Telnet? done */
if (tmxr_poll_conn (&sim_con_tmxr) >= 0) /* poll connect */
sim_con_ldsc.rcve = 1; /* rcv enabled */
sim_activate_after(uptr, 1000000); /* check again in 1 second */
if (sim_con_ldsc.xmte == 0) /* xmt disabled? */
tmxr_send_buffered_data (&sim_con_ldsc); /* try to flush buffered data */
tmxr_send_buffered_data (&sim_con_ldsc); /* try to flush any buffered data */
return SCPE_OK;
}

View file

@ -1272,8 +1272,6 @@ if ((lp->conn == 0) && /* no conn & not buffere
++lp->txdrp; /* lost */
return SCPE_LOST;
}
if (lp->txlog) /* log if available */
fputc (chr, lp->txlog);
tmxr_debug_trace_line (lp, "tmxr_putc_ln()");
#define TXBUF_AVAIL(lp) (lp->txbsz - tmxr_tqln (lp))
#define TXBUF_CHAR(lp, c) { \
@ -1288,6 +1286,8 @@ if ((lp->txbfd) || (TXBUF_AVAIL(lp) > 1)) { /* room for char (+ IAC)
TXBUF_CHAR (lp, chr); /* buffer char & adv pointer */
if ((!lp->txbfd) && (TXBUF_AVAIL (lp) <= TMXR_GUARD))/* near full? */
lp->xmte = 0; /* disable line */
if (lp->txlog) /* log if available */
fputc (chr, lp->txlog);
return SCPE_OK; /* char sent */
}
++lp->txdrp; lp->xmte = 0; /* no room, dsbl line */