Periodically flush buffered console mux data. This is necessary to cover the situation when data was buffered and sending data out the connection stalled due to OS/network buffering and no more output traffic happens to be generated.
This commit is contained in:
parent
faa5c61fe4
commit
f8ae8d2741
2 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,8 @@ if (sim_con_tmxr.master == 0) /* not Telnet? done */
|
||||||
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 */
|
||||||
|
if (sim_con_ldsc.xmte == 0) /* xmt disabled? */
|
||||||
|
tmxr_send_buffered_data (&sim_con_ldsc); /* try to flush buffered data */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -850,6 +850,7 @@ if (lp->serport) {
|
||||||
free (lp->serconfig);
|
free (lp->serconfig);
|
||||||
lp->serconfig = NULL;
|
lp->serconfig = NULL;
|
||||||
lp->cnms = 0;
|
lp->cnms = 0;
|
||||||
|
lp->rcve = lp->xmte = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (!lp->mp->modem_control) { /* serial connection? */
|
if (!lp->mp->modem_control) { /* serial connection? */
|
||||||
|
@ -862,6 +863,7 @@ else /* Telnet connection */
|
||||||
if (lp->conn) {
|
if (lp->conn) {
|
||||||
sim_close_sock (lp->conn, 0); /* close socket */
|
sim_close_sock (lp->conn, 0); /* close socket */
|
||||||
lp->conn = 0;
|
lp->conn = 0;
|
||||||
|
lp->rcve = lp->xmte = 0;
|
||||||
}
|
}
|
||||||
free(lp->ipad);
|
free(lp->ipad);
|
||||||
lp->ipad = NULL;
|
lp->ipad = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue