From 6e4d315c77eefa07ad0094451a560191478a1aa1 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 7 Nov 2017 13:08:52 -0800 Subject: [PATCH] TMXR: Detach serial ports which are explicitly disconnected by a user command --- sim_tmxr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index be7a4776..6acfb929 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -4454,7 +4454,9 @@ if (lp == NULL) /* bad line numb if ((lp->sock) || (lp->serport)) { /* connection active? */ if (!lp->notelnet) tmxr_linemsg (lp, "\r\nOperator disconnected line\r\n\n");/* report closure */ - tmxr_reset_ln_ex (lp, (sim_switches & SWMASK ('C'))); /* drop the line */ + if (lp->serport && (sim_switches & SWMASK ('C'))) + return tmxr_detach_ln (lp); + return tmxr_reset_ln_ex (lp, FALSE); /* drop the line */ } return SCPE_OK;