diff options
Diffstat (limited to 'sys/netinet/sctp_bsd_addr.c')
-rw-r--r-- | sys/netinet/sctp_bsd_addr.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c index 74404b9..1ae8ba6 100644 --- a/sys/netinet/sctp_bsd_addr.c +++ b/sys/netinet/sctp_bsd_addr.c @@ -96,22 +96,12 @@ sctp_iterator_thread(void *v SCTP_UNUSED) void sctp_startup_iterator(void) { - static int called = 0; - int ret; - - if (called) { + if (sctp_it_ctl.thread_proc) { /* You only get one */ return; } - /* init the iterator head */ - called = 1; - sctp_it_ctl.iterator_running = 0; - sctp_it_ctl.iterator_flags = 0; - sctp_it_ctl.cur_it = NULL; - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); - ret = kproc_create(sctp_iterator_thread, + kproc_create(sctp_iterator_thread, (void *)NULL, &sctp_it_ctl.thread_proc, RFPROC, |