From 67b0f3824235c00c6c7b7bd99e1b0f9cf134384d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 7 Jul 2018 21:57:23 -0700 Subject: [PATCH] TMXR: Give priority to pending transfer delays prior to considering queued data --- sim_tmxr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 538f2c48..2377de8c 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -4198,11 +4198,11 @@ for (i=0; ilines; i++) { if ((tmxr_tqln(lp)) && /* pending output data */ (lp->txnexttime < sim_gtime_now))/* that can be transmitted now? */ tmxr_send_buffered_data (lp);/* flush it */ - if (tmxr_tqln(lp) == 0) /* no pending output data */ - due = interval; /* No rush */ + if (lp->txnexttime > sim_gtime_now) + due = (int32)(lp->txnexttime - sim_gtime_now); else { - if (lp->txnexttime > sim_gtime_now) - due = (int32)(lp->txnexttime - sim_gtime_now); + if (tmxr_tqln(lp) == 0) /* no pending output data */ + due = interval; /* No rush */ else due = sim_processing_event ? 1 : 0; /* avoid potential infinite loop if called from service routine */ }