From: Thorsten Engel Date: Tue, 21 Mar 2006 12:38:30 +0000 (+0000) Subject: timeout 5min on W2K3 X-Git-Tag: Release-2.0.0~993 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a01d447e22efe4eb7609dd1c29ec41b220dcef7;p=bacula%2Fbacula timeout 5min on W2K3 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2845 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/win32/compat/vss_generic.cpp b/bacula/src/win32/compat/vss_generic.cpp index 75387df272..11c7b33d9c 100644 --- a/bacula/src/win32/compat/vss_generic.cpp +++ b/bacula/src/win32/compat/vss_generic.cpp @@ -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;