fix FCFS stream scheduler
#if defined(__FreeBSD__) && !defined(__Userspace__)
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_ss_functions.c 365071 2020-09-01 21:19:14Z mjg $");
+__FBSDID("$FreeBSD$");
#endif
#include <netinet/sctp_pcb.h>
@@ -814,11 +814,10 @@ sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
static void
sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
- int clear_values, int holds_lock)
+ int clear_values SCTP_UNUSED, int holds_lock)
{
struct sctp_stream_queue_pending *sp;
- if (clear_values) {
if (holds_lock == 0) {
SCTP_TCB_SEND_LOCK(stcb);
}
@@ -828,10 +827,10 @@ sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
sp->ss_next.tqe_next = NULL;
sp->ss_next.tqe_prev = NULL;
}
+ asoc->ss_data.last_out_stream = NULL;
if (holds_lock == 0) {
SCTP_TCB_SEND_UNLOCK(stcb);
}
- }
return;
}
