Don't implicitly terminate a user message when moving it to the

send_queue and the socket is closed. This results in strange
race conditions for the application.
While there, remove a stray character.

MFC after: 3 days
This commit is contained in:
Michael Tuexen 2015-12-25 18:11:40 +00:00
parent 6e05054094
commit 1672adc7b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292734

View File

@ -7219,7 +7219,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
}
/* Whack down the size */
atomic_subtract_int(&stcb->asoc.total_output_queue_size, sp->length);
if ((stcb->sctp_socket != NULL) && \
if ((stcb->sctp_socket != NULL) &&
((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) {
atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length);
@ -7238,9 +7238,6 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
}
}
some_taken = sp->some_taken;
if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) {
sp->msg_is_complete = 1;
}
re_look:
length = sp->length;
if (sp->msg_is_complete) {