check-host-optimize-20060123
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 23 Jan 2006 21:13:19 +0000 (21:13 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 23 Jan 2006 21:13:19 +0000 (21:13 +0000)
commitff40c87da3ce4c6a7a58c08eaa223e8760dc8f73
tree8d733fc6141b4fd36c1957b18d4943028a93d025
parentdb98b697fe4e1b38ac5e73d60dd101b2506e12a4
check-host-optimize-20060123

There should never be a case where h_Enumerate calls CheckHost with a
host whose callback_rxcon that is NULL.  However, due to a bug it ended up
being the case that it happened.  An examination of the CheckHost code
showed that the check for the HOSTDELETED flag should take place before
a reference to callback_rxcon is obtained.  If HOSTDELETED were set, the
code would simply release the reference immediately.  However, the process
of obtaining and releasing the reference required dropping and obtaining
locks that would be a performance hit.
src/viced/host.c