Fix an accounting bug and use sctp_timer_start to start a timer.
MFC after: 1 week
This commit is contained in:
parent
5a3fccd9bc
commit
45d9e3e378
@ -1594,9 +1594,17 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
next_fsn, control->fsn_included);
|
next_fsn, control->fsn_included);
|
||||||
TAILQ_REMOVE(&control->reasm, at, sctp_next);
|
TAILQ_REMOVE(&control->reasm, at, sctp_next);
|
||||||
lenadded = sctp_add_chk_to_control(control, strm, stcb, asoc, at, SCTP_READ_LOCK_NOT_HELD);
|
lenadded = sctp_add_chk_to_control(control, strm, stcb, asoc, at, SCTP_READ_LOCK_NOT_HELD);
|
||||||
asoc->size_on_all_streams += lenadded;
|
|
||||||
if (control->on_read_q) {
|
if (control->on_read_q) {
|
||||||
do_wakeup = 1;
|
do_wakeup = 1;
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* We only add to the
|
||||||
|
* size-on-all-streams if its not on
|
||||||
|
* the read q. The read q flag will
|
||||||
|
* cause a sballoc so its accounted
|
||||||
|
* for there.
|
||||||
|
*/
|
||||||
|
asoc->size_on_all_streams += lenadded;
|
||||||
}
|
}
|
||||||
next_fsn++;
|
next_fsn++;
|
||||||
if (control->end_added && control->pdapi_started) {
|
if (control->end_added && control->pdapi_started) {
|
||||||
@ -4229,8 +4237,7 @@ again:
|
|||||||
}
|
}
|
||||||
if (net->flight_size) {
|
if (net->flight_size) {
|
||||||
j++;
|
j++;
|
||||||
(void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks,
|
sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net);
|
||||||
sctp_timeout_handler, &net->rxt_timer);
|
|
||||||
if (net->window_probe) {
|
if (net->window_probe) {
|
||||||
net->window_probe = 0;
|
net->window_probe = 0;
|
||||||
}
|
}
|
||||||
@ -4242,8 +4249,7 @@ again:
|
|||||||
*/
|
*/
|
||||||
net->window_probe = 0;
|
net->window_probe = 0;
|
||||||
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
||||||
SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks,
|
sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net);
|
||||||
sctp_timeout_handler, &net->rxt_timer);
|
|
||||||
}
|
}
|
||||||
} else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
} else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
||||||
sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep,
|
sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user