Windows: reset local mount point count during freelance re-initialization
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 4 Mar 2010 21:23:36 +0000 (16:23 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 5 Mar 2010 16:47:23 +0000 (08:47 -0800)
When a re-initialization is taking place, be sure to reset
cm_noLocalMountPoints to 0 in case someone deletes the "Freelance"
registry key out from underneath the service.

LICENSE MIT

Change-Id: I2c3edd0d617d8fb7d670036510ca2a22eece0e6d
Reviewed-on: http://gerrit.openafs.org/1514
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_freelance.c

index bef54ed..f512a1d 100644 (file)
@@ -18,7 +18,7 @@
 
 extern void afsi_log(char *pattern, ...);
 
-static int cm_noLocalMountPoints;
+static int cm_noLocalMountPoints = 0;
 char * cm_FakeRootDir = NULL;
 int cm_fakeDirSize = 0;
 int cm_fakeDirCallback=0;
@@ -433,6 +433,8 @@ int cm_reInitLocalMountPoints() {
     // cm_InitLocalMountPoints call
     osi_Log0(afsd_logp,"Removing old localmountpoints...  ");
     free(cm_localMountPoints);
+    cm_localMountPoints = NULL;
+    cm_noLocalMountPoints = 0;
     osi_Log0(afsd_logp,"\tall old localmountpoints cleared!");
 
     // now re-init the localmountpoints