TMXR: Give priority to pending transfer delays prior to considering queued data

This commit is contained in:
Mark Pizzolato 2018-07-07 21:57:23 -07:00
parent 58ccb38d7b
commit 67b0f38242

View file

@ -4198,11 +4198,11 @@ for (i=0; i<mp->lines; 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 */
}