From: Jeffrey Altman Date: Tue, 30 Aug 2011 13:49:11 +0000 (-0400) Subject: Windows: correct CheckOfflineVolumeState logic X-Git-Tag: upstream/1.6.1.pre1^2~249 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7b8b968c7ddc7214aaaaa426c7b6fab8e617729b;p=packages%2Fo%2Fopenafs.git Windows: correct CheckOfflineVolumeState logic Do not blindly set the return 'online' state to TRUE if the state has not in fact changed. Do not blindly clear the 'alldown' flag without checking the actual 'down' state of the file server. Reviewed-on: http://gerrit.openafs.org/5323 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7) Change-Id: I96cd543480dd87f0998e36fd43deebd2142db1a0 Reviewed-on: http://gerrit.openafs.org/5324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 93aceea5b..393468482 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1226,8 +1226,9 @@ cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep, afs_uint32 continue; alldeleted = 0; - *onlinep = 1; - alldown = 0; + + if (!(serversp->server->flags & CM_SERVERFLAG_DOWN)) + alldown = 0; if (serversp->status == srv_busy || serversp->status == srv_offline) serversp->status = srv_not_busy;