]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-freelance-20041204
authorJeffrey Altman <jaltman@mit.edu>
Tue, 7 Dec 2004 06:14:52 +0000 (06:14 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Dec 2004 06:14:52 +0000 (06:14 +0000)
perform a bit more error checking and logging when loading mountpoints and
symlinks from the registry

(cherry picked from commit 38ed975350a879cd2a8d45c3e71aa2ed49e8b664)

src/WINNT/afsd/cm_freelance.c

index 852f86c7ba11bc9246e1411e05d3c63e33485d28..28ee45f8b50b745e08a554b72451e566ba98b996 100644 (file)
@@ -527,8 +527,15 @@ long cm_InitLocalMountPoints() {
             TCHAR szValueName[16];
             DWORD dwValueSize = 16;
             dwSize = sizeof(line);
-            RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
-                          &dwType, line, &dwSize);
+            if (RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+                          &dwType, line, &dwSize))
+            {
+                afsi_log("RegEnumValue(hkFreelance) failed");
+                cm_noLocalMountPoints--;
+                continue;
+            }
+
+            afsi_log("Mountpoint[%d] = %s",dwIndex, line);
 
             /* find the trailing dot; null terminate after it */
             t2 = strrchr(line, '.');
@@ -568,8 +575,15 @@ long cm_InitLocalMountPoints() {
             TCHAR szValueName[16];
             DWORD dwValueSize = 16;
             dwSize = sizeof(line);
-            RegEnumValue( hkFreelanceSymlinks, dwIndex, szValueName, &dwValueSize, NULL,
-                          &dwType, line, &dwSize);
+            if (RegEnumValue( hkFreelanceSymlinks, dwIndex, szValueName, &dwValueSize, NULL,
+                              &dwType, line, &dwSize))
+            {
+                afsi_log("RegEnumValue(hkFreelanceSymlinks) failed");
+                cm_noLocalMountPoints--;
+                continue;
+            }
+
+            afsi_log("Symlink[%d] = %s",dwIndex, line);
 
             /* find the trailing dot; null terminate after it */
             t2 = strrchr(line, '.');