From 2904445bd2e2aa479d3c63b45842ebc644593cae Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 11 Apr 2008 16:05:55 +0000 Subject: [PATCH] Fixup. git-svn-id: file:///svn/unbound/trunk@1032 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + services/outside_network.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 45bbbcce9..6b75bc774 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ - fixup threadsafety for libevent-1.4.3+ (event_base_get_method). - removed base_port. - created 256-port ephemeral space for the OS, 59802 available. + - fixup consistency of port_if out array during heavy use. 10 April 2008: Wouter - --with-libevent works with latest libevent 1.4.99-trunk. diff --git a/services/outside_network.c b/services/outside_network.c index 586400e1c..3ab3cb158 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -241,12 +241,14 @@ portcomm_loweruse(struct outside_network* outnet, struct port_comm* pc) return; } /* close it and replace in unused list */ + verbose(VERB_ALGO, "close of port %d", pc->number); comm_point_close(pc->cp); pif = pc->pif; log_assert(pif->inuse > 0); pif->avail_ports[pif->avail_total - pif->inuse] = pc->number; pif->inuse--; pif->out[pc->index] = pif->out[pif->inuse]; + pif->out[pc->index]->index = pc->index; pc->next = outnet->unused_fds; outnet->unused_fds = pc; } -- 2.47.2