]> git.sur5r.net Git - bacula/bacula/commitdiff
timeout 5min on W2K3
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Tue, 21 Mar 2006 12:38:30 +0000 (12:38 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Tue, 21 Mar 2006 12:38:30 +0000 (12:38 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2845 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/compat/vss_generic.cpp

index 75387df27267cffa886a30f6045ccde79deafa69..11c7b33d9c42f2219810e8ae0f03df4966e5a75b 100644 (file)
@@ -67,6 +67,8 @@ using namespace std;
 #ifdef B_VSS_XP
    #pragma message("compile VSS for Windows XP")   
    #define VSSClientGeneric VSSClientXP
+   // wait is not available under XP...
+   #define VSS_TIMEOUT
 
    #include "vss/inc/WinXP/vss.h"
    #include "vss/inc/WinXP/vswriter.h"
@@ -85,6 +87,8 @@ using namespace std;
 #ifdef B_VSS_W2K3
    #pragma message("compile VSS for Windows 2003")
    #define VSSClientGeneric VSSClient2003
+   // wait x ms for a VSS asynchronous operation (-1 = infinite)
+   #define VSS_TIMEOUT (DWORD) 300000
 
    #include "vss/inc/Win2003/vss.h"
    #include "vss/inc/Win2003/vswriter.h"
@@ -278,7 +282,7 @@ BOOL VSSClientGeneric::Initialize(DWORD dwContext, BOOL bDuringRestore)
 void VSSClientGeneric::WaitAndCheckForAsyncOperation(IVssAsync* pAsync)
 {
      // Wait until the async operation finishes
-    HRESULT hr = pAsync->Wait();
+    HRESULT hr = pAsync->Wait(VSS_TIMEOUT);
 
     // Check the result of the asynchronous operation
     HRESULT hrReturned = S_OK;