initialize values to avoid INSIST(l->nwactive == 0) when starting

This commit is contained in:
Bob Halley
1999-02-01 20:37:40 +00:00
parent 8a17d1e7cd
commit d55fedfce0
2 changed files with 12 additions and 0 deletions

View File

@@ -391,7 +391,13 @@ tcp_listener_allocate(isc_mem_t *mctx, u_int nwmax)
l->ctxs = isc_mem_get(mctx, sizeof(tcp_cctx_t *) * nwmax);
RUNTIME_CHECK(l->ctxs != NULL); /* XXX should be non-fatal? */
l->sock = NULL;
l->nwstart = 0;
l->nwkeep = 0;
l->nwmax = nwmax;
l->mctx = mctx;
l->dispatch = NULL;
l->nwactive = 0;
return (l);
}

View File

@@ -206,7 +206,13 @@ udp_listener_allocate(isc_mem_t *mctx, u_int nwmax)
l->ctxs = isc_mem_get(mctx, sizeof(udp_cctx_t *) * nwmax);
RUNTIME_CHECK(l->ctxs != NULL); /* XXX should be non-fatal? */
l->sock = NULL;
l->nwstart = 0;
l->nwkeep = 0;
l->nwmax = nwmax;
l->mctx = mctx;
l->dispatch = NULL;
l->nwactive = 0;
return (l);
}