Slight style reformatting of spx_timers() comments; panic if an

unrecognized timer is passed into the function.

MFC after:	1 month
This commit is contained in:
Robert Watson 2006-03-25 14:29:03 +00:00
parent a0196c3c89
commit 6d3d51f03e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157124

View File

@ -1859,22 +1859,21 @@ spx_timers(struct spxpcb *cb, int timer)
cb->s_force = 1 + timer;
switch (timer) {
/*
* 2 MSL timeout in shutdown went off. TCP deletes connection
* control block.
*/
case SPXT_2MSL:
/*
* 2 MSL timeout in shutdown went off. TCP deletes
* connection control block.
*/
printf("spx: SPXT_2MSL went off for no reason\n");
cb->s_timer[timer] = 0;
break;
/*
* Retransmission timer went off. Message has not been acked within
* retransmit interval. Back off to a longer retransmit interval and
* retransmit one packet.
*/
case SPXT_REXMT:
/*
* Retransmission timer went off. Message has not been acked
* within retransmit interval. Back off to a longer
* retransmit interval and retransmit one packet.
*/
if (++cb->s_rxtshift > SPX_MAXRXTSHIFT) {
cb->s_rxtshift = SPX_MAXRXTSHIFT;
spxstat.spxs_timeoutdrop++;
@ -1950,6 +1949,9 @@ spx_timers(struct spxpcb *cb, int timer)
spx_drop(cb, ETIMEDOUT);
cb = NULL;
break;
default:
panic("spx_timers: unknown timer %d", timer);
}
return (cb);
}