Assert so->so_pcb is NULL in sodealloc() -- the protocol state should not

be present at this point.  We will eventually remove this assert because
the socket layer should never look at so_pcb, but for now it's a useful
debugging tool.

MFC after:	3 months
This commit is contained in:
Robert Watson 2006-04-01 10:45:52 +00:00
parent 220c1357ed
commit 7f689de232

View File

@ -307,6 +307,8 @@ sodealloc(struct socket *so)
{
KASSERT(so->so_count == 0, ("sodealloc(): so_count %d", so->so_count));
KASSERT(so->so_pcb == NULL, ("sodealloc(): so_pcb != NULL"));
mtx_lock(&so_global_mtx);
so->so_gencnt = ++so_gencnt;
mtx_unlock(&so_global_mtx);