From 584147fb640322e1d7674d7694846cc0aa29d847 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 20 May 2018 08:07:30 -0700 Subject: [PATCH] TMXR: Remove output unit from delay consideration after poll has nothing queued The goal of the logic in _tmxr_activate_delay() is to properly schedule the next poll activity considering input and/or output data rates that may be in effect. We need to make sure that one more poll is scheduled after output data has been sent since simulation logic may have deferred queuing output data for other reasons and handles its reactivation in the same context that it polls for output. --- sim_tmxr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 465f9808..79549ef1 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -2267,8 +2267,10 @@ for (i = 0; i < mp->lines; i++) { /* loop thru lines */ #endif if ((lp->xmte == 0) && ((lp->txbps == 0) || - (lp->txnexttime <= sim_gtime ()))) + (lp->txnexttime <= sim_gtime ()))) { lp->xmte = 1; /* enable line transmit */ + lp->txnexttime = 0.0; + } } } /* end for */ }