Fixed tmxr xmte and rcve management to be consistent with original behavior

This commit is contained in:
Mark Pizzolato 2013-01-24 07:07:39 -08:00
parent 29cf2a45a8
commit f7b2f44c9c

View file

@ -908,6 +908,8 @@ return -1; /* no new connections ma
static t_stat tmxr_reset_ln_ex (TMLN *lp, t_bool closeserial) static t_stat tmxr_reset_ln_ex (TMLN *lp, t_bool closeserial)
{ {
tmxr_debug_trace_line (lp, "tmxr_reset_ln_ex)"); tmxr_debug_trace_line (lp, "tmxr_reset_ln_ex)");
if (lp->txlog)
fflush (lp->txlog); /* flush log */ fflush (lp->txlog); /* flush log */
tmxr_send_buffered_data (lp); /* send any buffered data */ tmxr_send_buffered_data (lp); /* send any buffered data */
@ -922,8 +924,7 @@ if (lp->serport) {
free (lp->serconfig); free (lp->serconfig);
lp->serconfig = NULL; lp->serconfig = NULL;
lp->cnms = 0; lp->cnms = 0;
lp->conn = FALSE; lp->xmte = 1;
lp->rcve = lp->xmte = 0;
} }
else else
if (!lp->mp->modem_control) { /* serial connection? */ if (!lp->mp->modem_control) { /* serial connection? */
@ -937,7 +938,8 @@ else /* Telnet connection */
sim_close_sock (lp->sock, 0); /* close socket */ sim_close_sock (lp->sock, 0); /* close socket */
lp->sock = 0; lp->sock = 0;
lp->conn = FALSE; lp->conn = FALSE;
lp->rcve = lp->xmte = 0; lp->cnms = 0;
lp->xmte = 1;
} }
free(lp->ipad); free(lp->ipad);
lp->ipad = NULL; lp->ipad = NULL;