Cleanup, no functional change intended.
MFC after: 3 days
This commit is contained in:
parent
a113b1037f
commit
11daa73adc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366480
@ -3077,43 +3077,27 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize,
|
||||
break;
|
||||
}
|
||||
case SCTP_RECVRCVINFO:
|
||||
{
|
||||
int onoff;
|
||||
|
||||
if (*optsize < sizeof(int)) {
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
SCTP_INP_RLOCK(inp);
|
||||
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO);
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
}
|
||||
if (error == 0) {
|
||||
/* return the option value */
|
||||
*(int *)optval = onoff;
|
||||
*optsize = sizeof(int);
|
||||
}
|
||||
break;
|
||||
if (*optsize < sizeof(int)) {
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
SCTP_INP_RLOCK(inp);
|
||||
*(int *)optval = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO);
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
*optsize = sizeof(int);
|
||||
}
|
||||
break;
|
||||
case SCTP_RECVNXTINFO:
|
||||
{
|
||||
int onoff;
|
||||
|
||||
if (*optsize < sizeof(int)) {
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
SCTP_INP_RLOCK(inp);
|
||||
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO);
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
}
|
||||
if (error == 0) {
|
||||
/* return the option value */
|
||||
*(int *)optval = onoff;
|
||||
*optsize = sizeof(int);
|
||||
}
|
||||
break;
|
||||
if (*optsize < sizeof(int)) {
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
SCTP_INP_RLOCK(inp);
|
||||
*(int *)optval = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO);
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
*optsize = sizeof(int);
|
||||
}
|
||||
break;
|
||||
case SCTP_DEFAULT_SNDINFO:
|
||||
{
|
||||
struct sctp_sndinfo *info;
|
||||
|
Loading…
Reference in New Issue
Block a user