mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
Some more uint32_t cleanups, no functional change.
MFC after: 1 week
This commit is contained in:
parent
e4c8ad744a
commit
d5d190f2f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359379
@ -273,11 +273,11 @@ struct sctp_pcb {
|
|||||||
uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS];
|
uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS];
|
||||||
unsigned int size_of_a_cookie;
|
unsigned int size_of_a_cookie;
|
||||||
|
|
||||||
unsigned int sctp_timeoutticks[SCTP_NUM_TMRS];
|
uint32_t sctp_timeoutticks[SCTP_NUM_TMRS];
|
||||||
unsigned int sctp_minrto;
|
uint32_t sctp_minrto;
|
||||||
unsigned int sctp_maxrto;
|
uint32_t sctp_maxrto;
|
||||||
unsigned int initial_rto;
|
uint32_t initial_rto;
|
||||||
int initial_init_rto_max;
|
uint32_t initial_init_rto_max;
|
||||||
|
|
||||||
unsigned int sctp_sack_freq;
|
unsigned int sctp_sack_freq;
|
||||||
uint32_t sctp_sws_sender;
|
uint32_t sctp_sws_sender;
|
||||||
|
@ -1062,7 +1062,7 @@ struct sctp_association {
|
|||||||
uint32_t heart_beat_delay;
|
uint32_t heart_beat_delay;
|
||||||
|
|
||||||
/* autoclose */
|
/* autoclose */
|
||||||
unsigned int sctp_autoclose_ticks;
|
uint32_t sctp_autoclose_ticks;
|
||||||
|
|
||||||
/* how many preopen streams we have */
|
/* how many preopen streams we have */
|
||||||
unsigned int pre_open_streams;
|
unsigned int pre_open_streams;
|
||||||
|
@ -1524,10 +1524,10 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
|
|||||||
{
|
{
|
||||||
struct timeval tn, *tim_touse;
|
struct timeval tn, *tim_touse;
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
int ticks_gone_by;
|
uint32_t ticks_gone_by;
|
||||||
|
|
||||||
(void)SCTP_GETTIME_TIMEVAL(&tn);
|
(void)SCTP_GETTIME_TIMEVAL(&tn);
|
||||||
if (stcb->asoc.sctp_autoclose_ticks &&
|
if (stcb->asoc.sctp_autoclose_ticks > 0 &&
|
||||||
sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) {
|
sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) {
|
||||||
/* Auto close is on */
|
/* Auto close is on */
|
||||||
asoc = &stcb->asoc;
|
asoc = &stcb->asoc;
|
||||||
@ -1539,9 +1539,8 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
|
|||||||
tim_touse = &asoc->time_last_sent;
|
tim_touse = &asoc->time_last_sent;
|
||||||
}
|
}
|
||||||
/* Now has long enough transpired to autoclose? */
|
/* Now has long enough transpired to autoclose? */
|
||||||
ticks_gone_by = SEC_TO_TICKS(tn.tv_sec - tim_touse->tv_sec);
|
ticks_gone_by = SEC_TO_TICKS((uint32_t)(tn.tv_sec - tim_touse->tv_sec));
|
||||||
if ((ticks_gone_by > 0) &&
|
if (ticks_gone_by >= asoc->sctp_autoclose_ticks) {
|
||||||
(ticks_gone_by >= (int)asoc->sctp_autoclose_ticks)) {
|
|
||||||
/*
|
/*
|
||||||
* autoclose time has hit, call the output routine,
|
* autoclose time has hit, call the output routine,
|
||||||
* which should do nothing just to be SURE we don't
|
* which should do nothing just to be SURE we don't
|
||||||
@ -1584,7 +1583,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
|
|||||||
* No auto close at this time, reset t-o to check
|
* No auto close at this time, reset t-o to check
|
||||||
* later
|
* later
|
||||||
*/
|
*/
|
||||||
int tmp;
|
uint32_t tmp;
|
||||||
|
|
||||||
/* fool the timer startup to use the time left */
|
/* fool the timer startup to use the time left */
|
||||||
tmp = asoc->sctp_autoclose_ticks;
|
tmp = asoc->sctp_autoclose_ticks;
|
||||||
|
Loading…
Reference in New Issue
Block a user