From 1370ad6a2c325585ea4f412e0efad435a205824f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 18 Dec 2012 15:41:34 -0800 Subject: [PATCH] Fixed console serial port connection checking --- sim_console.c | 6 +++++- sim_tmxr.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim_console.c b/sim_console.c index db9c6671..3d0d97f4 100644 --- a/sim_console.c +++ b/sim_console.c @@ -774,7 +774,11 @@ t_stat sim_check_console (int32 sec) { int32 c, i; -if (sim_con_tmxr.master == 0) /* not Telnet? done */ +if (sim_con_ldsc.serport) + if (tmxr_poll_conn (&sim_con_tmxr) >= 0) + sim_con_ldsc.rcve = 1; /* rcv enabled */ +if ((sim_con_tmxr.master == 0) || /* serial console or not Telnet? done */ + (sim_con_ldsc.serport)) return SCPE_OK; if (sim_con_ldsc.conn || sim_con_ldsc.txbfd) { /* connected or buffered ? */ tmxr_poll_rx (&sim_con_tmxr); /* poll (check disconn) */ diff --git a/sim_tmxr.c b/sim_tmxr.c index 9024a9a1..3402f7bd 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -844,6 +844,7 @@ for (i = 0; i < mp->lines; i++) { /* check each line in se if (lp->ser_connect_pending) { lp->ser_connect_pending = FALSE; + lp->conn = TRUE; return i; } }