DEVEL15-rx-init-more-packets-20080529
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 29 May 2008 14:33:29 +0000 (14:33 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 29 May 2008 14:33:29 +0000 (14:33 +0000)
commit775630172b43fa9eafa762ef661e2199a328c75e
tree3f4b1f252dde8ca375d7f9e9127648f103b3bfc5
parent040a4a93b57a444b28e25d3a07bd51e2738ceec7
DEVEL15-rx-init-more-packets-20080529

LICENSE MIT

It is frequently the case that rx_getAllAddr() is called before
rx_Init() or rx_InitHost().  rx_getAllAddr() obtains the list of
interfaces by using rx_GetIFInfo() which in turn computes and
allocates the number of addition rx packets.  Unfortunately,
rxi_MorePackets() relies on the existence of an initialized mutex
and the mutex is not initialized (on Windows) until the rx_InitHost()
call.  Therefore, we must delay the rxi_MorePackets() call until
after rx_InitHost() if rx_getAllAddr() is called previously.

Failure to do so results in a panic.

(cherry picked from commit 749ae65481ebc70f310fdd79d2cb0139a636f27e)
src/rx/rx.c
src/rx/rx_user.c