Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/sctputil.c
Show First 20 Lines • Show All 5,634 Lines • ▼ Show 20 Lines | if ((so->so_rcv.sb_cc == 0) && | ||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOTCONN); | SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOTCONN); | ||||
error = ENOTCONN; | error = ENOTCONN; | ||||
} | } | ||||
} | } | ||||
goto out; | goto out; | ||||
} | } | ||||
} | } | ||||
if (block_allowed) { | if (block_allowed) { | ||||
error = sbwait(&so->so_rcv); | error = sbwait(so, SO_RCV); | ||||
if (error) { | if (error) { | ||||
goto out; | goto out; | ||||
} | } | ||||
held_length = 0; | held_length = 0; | ||||
goto restart_nosblocks; | goto restart_nosblocks; | ||||
} else { | } else { | ||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EWOULDBLOCK); | SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EWOULDBLOCK); | ||||
error = EWOULDBLOCK; | error = EWOULDBLOCK; | ||||
▲ Show 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | if (hold_sblock == 0) { | ||||
SOCKBUF_LOCK(&so->so_rcv); | SOCKBUF_LOCK(&so->so_rcv); | ||||
hold_sblock = 1; | hold_sblock = 1; | ||||
} | } | ||||
if ((copied_so_far) && (control->length == 0) && | if ((copied_so_far) && (control->length == 0) && | ||||
(sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE))) { | (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE))) { | ||||
goto release; | goto release; | ||||
} | } | ||||
if (so->so_rcv.sb_cc <= control->held_length) { | if (so->so_rcv.sb_cc <= control->held_length) { | ||||
error = sbwait(&so->so_rcv); | error = sbwait(so, SO_RCV); | ||||
if (error) { | if (error) { | ||||
goto release; | goto release; | ||||
} | } | ||||
control->held_length = 0; | control->held_length = 0; | ||||
} | } | ||||
if (hold_sblock) { | if (hold_sblock) { | ||||
SOCKBUF_UNLOCK(&so->so_rcv); | SOCKBUF_UNLOCK(&so->so_rcv); | ||||
hold_sblock = 0; | hold_sblock = 0; | ||||
▲ Show 20 Lines • Show All 1,412 Lines • Show Last 20 Lines |