From: Jeffrey Altman Date: Fri, 24 Feb 2012 17:21:46 +0000 (-0500) Subject: Windows: cm_UpdateCell never applies to Freelance mode X-Git-Tag: upstream/1.6.1.pre4^2~12 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=778d922cee9a73c7d829b87aacec2513433c6a23;p=packages%2Fo%2Fopenafs.git Windows: cm_UpdateCell never applies to Freelance mode The Freelance.Local.Cell is updated by the registry monitor thread and cm_UpdateCell should be a no-op. Make it so. Reviewed-on: http://gerrit.openafs.org/6791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cfb7f205d8153899c0165594a29d91926a40425d) Change-Id: I2607ea87ebcc849474f4e0a183d7ad4eba121de9 Reviewed-on: http://gerrit.openafs.org/6829 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_cell.c b/src/WINNT/afsd/cm_cell.c index dbb9e1ac5..c60e43336 100644 --- a/src/WINNT/afsd/cm_cell.c +++ b/src/WINNT/afsd/cm_cell.c @@ -81,14 +81,19 @@ cm_cell_t *cm_UpdateCell(cm_cell_t * cp, afs_uint32 flags) lock_ObtainMutex(&cp->mx); mxheld = 1; - if ((cp->vlServersp == NULL + #ifdef AFS_FREELANCE_CLIENT - && !(cp->flags & CM_CELLFLAG_FREELANCE) + if (cp->flags & CM_CELLFLAG_FREELANCE) { + lock_ReleaseMutex(&cp->mx); + return cp; + } #endif - ) || (time(0) > cp->timeout) - || (cm_dnsEnabled && (cp->flags & CM_CELLFLAG_DNS) && - ((cp->flags & CM_CELLFLAG_VLSERVER_INVALID))) - ) + + if ((cp->vlServersp == NULL) || + (time(0) > cp->timeout) || + (cm_dnsEnabled && + (cp->flags & CM_CELLFLAG_DNS) && + ((cp->flags & CM_CELLFLAG_VLSERVER_INVALID)))) { lock_ReleaseMutex(&cp->mx); mxheld = 0;