nt-power-mgmt-fix-20040617
authorJeffrey Altman <jaltman@mit.edu>
Fri, 18 Jun 2004 05:52:25 +0000 (05:52 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 18 Jun 2004 05:52:25 +0000 (05:52 +0000)
The fixed timeout of 19 seconds was too short.  Should be set to the
value of HardDeadtimeout as set by cm_conn.c.  The failure to specify
an adequate timeout value prevented successful Hibernation and Standby
mode access when network connectivity was not available.

src/WINNT/afsd/afsd_flushvol.c

index 83267fa..32ab700 100644 (file)
@@ -16,6 +16,7 @@
 #include "afsd.h"
 #include "afsd_init.h"
 #include "smb.h"
+#include "cm_conn.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <malloc.h>
@@ -466,11 +467,11 @@ PowerNotificationThreadNotify()
        DWORD           dwRet = 0;
        BOOL            bRet  = FALSE;
 
-       // Notify thread of power event, and wait 19 seconds
+       // Notify thread of power event, and wait for the HardDead timeout period
        dwRet = SignalObjectAndWait(
                                gThreadInfo.hEventPowerEvent,   // object to signal
                                gThreadInfo.hEventResumeMain,   // object to watch
-                               19*1000,                                                // timeout (ms)
+                               HardDeadtimeout*1000,                   // timeout (ms)
                                FALSE                                                   // alertable
                                );