TMXR: Detach serial ports which are explicitly disconnected by a user command

This commit is contained in:
Mark Pizzolato 2017-11-07 13:08:52 -08:00
parent d505cb1d96
commit 6e4d315c77

View file

@ -4454,7 +4454,9 @@ if (lp == NULL) /* bad line numb
if ((lp->sock) || (lp->serport)) { /* connection active? */ if ((lp->sock) || (lp->serport)) { /* connection active? */
if (!lp->notelnet) if (!lp->notelnet)
tmxr_linemsg (lp, "\r\nOperator disconnected line\r\n\n");/* report closure */ 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; return SCPE_OK;