Windows: cm_UpdateCell never applies to Freelance mode
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 24 Feb 2012 17:21:46 +0000 (12:21 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 24 Feb 2012 22:37:41 +0000 (14:37 -0800)
The Freelance.Local.Cell is updated by the registry monitor
thread and cm_UpdateCell should be a no-op.  Make it so.

Change-Id: I2961114590af6b64b8ae06d608a97513e83aad4e
Reviewed-on: http://gerrit.openafs.org/6791
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsd/cm_cell.c

index 4c8711b..cf0448f 100644 (file)
@@ -84,14 +84,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;