Windows: multi ping do not leak ping count
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 30 Sep 2015 17:23:36 +0000 (13:23 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 8 Oct 2015 03:36:31 +0000 (23:36 -0400)
commit3957abea2abcd791e97e66be3f3ef211672ce713
tree3c7aacd7d6301c4d95c03266601e010662888bb9
parentf8bf8221db919521ecabea20c4c8e496fb423ef4
Windows: multi ping do not leak ping count

In cm_CheckServersMulti() if cm_ConnByServer() fails or if cm_noIPAddr is
zero then a cm_server.pingCount will be leaked.  This can result in
servers being marked down and never restored to an up state.

This change adds the necessary pingCount decrement and moves the
assignment of the cm_server_t pointer to serversp[] to make it clear
that the cm_server_t will not be in the array if a failure occurs.
Only objects in the array will have the pingCount decremented after
the RPCs are issued.

Change-Id: I18895c848039e4131a674d814019f236a1b0e5b5
Reviewed-on: http://gerrit.openafs.org/12048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_server.c