TMXR: Fix tmxr_rqln() when speeds are enabled to avoid aways ready condition.
This commit is contained in:
parent
9dbc800e58
commit
1a48c543d5
1 changed files with 5 additions and 5 deletions
|
@ -2125,20 +2125,20 @@ for (i = 0; i < mp->lines; i++) { /* loop thru lines */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32 tmxr_rqln_bare (const TMLN *lp, t_bool speed)
|
static int32 tmxr_rqln_bare (const TMLN *lp, t_bool speed)
|
||||||
{
|
{
|
||||||
if (speed) {
|
if (speed) {
|
||||||
if (lp->send.extoff < lp->send.insoff) {/* buffered SEND data? */
|
if (lp->send.extoff < lp->send.insoff) {/* buffered SEND data? */
|
||||||
if (sim_gtime () < lp->send.next_time)
|
if (sim_gtime () < lp->send.next_time) /* too soon? */
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return lp->send.delay ? 1 : (lp->send.insoff - lp->send.extoff);
|
return 1;
|
||||||
}
|
}
|
||||||
if (lp->rxbps) { /* consider speed and rate limiting? */
|
if (lp->rxbps) { /* consider speed and rate limiting? */
|
||||||
if (sim_gtime () < lp->rxnexttime) /* too soon? */
|
if (sim_gtime () < lp->rxnexttime) /* too soon? */
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return 1;
|
return ((lp->rxbpi - lp->rxbpr + ((lp->rxbpi < lp->rxbpr)? lp->rxbsz : 0)) > 0) ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (lp->rxbpi - lp->rxbpr + ((lp->rxbpi < lp->rxbpr)? lp->rxbsz : 0));
|
return (lp->rxbpi - lp->rxbpr + ((lp->rxbpi < lp->rxbpr)? lp->rxbsz : 0));
|
||||||
|
|
Loading…
Add table
Reference in a new issue