diff options
author | rrs <rrs@FreeBSD.org> | 2007-05-08 15:53:03 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-05-08 15:53:03 +0000 |
commit | 8b8ad155c530dd9a4bac8ade13e4c32936248c56 (patch) | |
tree | 44ac625c143fdb6f1b927d038e030549e30d9a60 /sys/netinet/sctputil.c | |
parent | d5af35a7d4035bd703702740bc3e78f14022234d (diff) | |
download | FreeBSD-src-8b8ad155c530dd9a4bac8ade13e4c32936248c56.zip FreeBSD-src-8b8ad155c530dd9a4bac8ade13e4c32936248c56.tar.gz |
- Get rid of the sctp_inpcb_free() "magic numbers", now they
are sensible defines that tell what you are directing
the function to do.
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 44c8475..3127fc7 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1669,7 +1669,8 @@ sctp_timeout_handler(void *t) */ SCTP_INP_DECR_REF(inp); sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_3); - sctp_inpcb_free(inp, 1, 0); + sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, + SCTP_CALLED_DIRECTLY_NOCMPSET); goto out_no_decr; break; default: @@ -3515,7 +3516,8 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } else { if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { if (LIST_FIRST(&inp->sctp_asoc_list) == NULL) { - sctp_inpcb_free(inp, 1, 0); + sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, + SCTP_CALLED_DIRECTLY_NOCMPSET); } } } @@ -3592,7 +3594,8 @@ sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* Got to have a TCB */ if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { if (LIST_FIRST(&inp->sctp_asoc_list) == NULL) { - sctp_inpcb_free(inp, 1, 0); + sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, + SCTP_CALLED_DIRECTLY_NOCMPSET); } } return; @@ -3627,7 +3630,8 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, /* Generate a TO address for future reference */ if (inp && (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) { if (LIST_FIRST(&inp->sctp_asoc_list) == NULL) { - sctp_inpcb_free(inp, 1, 0); + sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, + SCTP_CALLED_DIRECTLY_NOCMPSET); } } ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset, |