hidedots-fix-20040228
authorJeffrey Altman <jaltman@mit.edu>
Sat, 28 Feb 2004 19:10:05 +0000 (19:10 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 28 Feb 2004 19:10:05 +0000 (19:10 +0000)
* Fix the Hiding of dot files.  attributes were computed but never applied
  due to typo during merge

* Prevent crashing during service shutdown by power management thread

src/WINNT/afsd/afsd_flushvol.c
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/smb3.c

index d3abfbd..4ba3971 100644 (file)
@@ -341,6 +341,7 @@ afsd_ServiceFlushVolumesThreadProc(LPVOID lpParam)
                case WAIT_OBJECT_0:
                        // termination signaled
                        RevertToSelf();
+                       Sleep(500);
                        ExitThread(0);
                        break;
 
index cf36cbd..4d5a60b 100644 (file)
@@ -1420,6 +1420,9 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie)
     char output[1024];
     int i;
   
+       if (buf_hashTablepp == NULL)
+               return -1;
+
     lock_ObtainRead(&buf_globalLock);
   
     sprintf(output, "%s - dumping buf_HashTable - buf_hashSize=%d\n", cookie, buf_hashSize);
index 4fb7f04..92565af 100644 (file)
@@ -1661,10 +1661,10 @@ long smb_ApplyV3DirListPatches(cm_scache_t *dscp,
 
                        /* Copy attributes */
                        lattr = smb_ExtAttributes(scp);
-                       *((u_long *)dptr) = lattr;
             /* merge in hidden (dot file) attribute */
                        if( patchp->flags & SMB_DIRLISTPATCH_DOTFILE )
                                lattr |= SMB_ATTR_HIDDEN;
+                       *((u_long *)dptr) = lattr;
                        dptr += 4;
                }
                else {