]> git.sur5r.net Git - bacula/bacula/commitdiff
fix crash on exchange restore fail
authorJames Harper <james.harper@bendigoit.com.au>
Sun, 18 Oct 2009 09:00:39 +0000 (11:00 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 18 Oct 2009 09:00:39 +0000 (11:00 +0200)
bacula/src/win32/filed/plugins/api.c
bacula/src/win32/filed/plugins/api.h
bacula/src/win32/filed/plugins/storage_group_node.c

index cde58e5f8c88b46f2563a477ac737453082a7e55..1efb35b48800eeb4a7ef437323e7130b38a86652 100644 (file)
@@ -135,6 +135,8 @@ ESEErrorMessage(HRESULT result)
       return "Exchange backup already in progress.";
    case hrLogfileNotContiguous:
       return "Existing log file is not contiguous. Check that no stale files are left in the Exchange data/log directories.";
+   case hrErrorFromESECall:
+      return "Error returned from ESE function call. Check the Windows Event Logs for more information.";
    case hrCBDatabaseNotFound:
       return "Database not found. Check that the Database you are trying to restore actually exists in the Storage Group you are restoring to.";
    default:
index e2ced85626ffc1dce8e5fca593d40d917d7a23cf..0bcc16a57afbf7169e7fafc9f0b3dc2c7bc76d28 100644 (file)
@@ -257,6 +257,7 @@ ESEErrorMessage(HRESULT result);
 #define hrMissingFullBackup         (HRESULT)0xC8000230L
 #define hrBackupInProgress          (HRESULT)0xC80001F9L
 #define hrCBDatabaseNotFound        (HRESULT)0xC7FE1F42L
+#define hrErrorFromESECall          (HRESULT)0xC7FF1004L
 
 extern HrESEBackupRestoreGetNodes_t HrESEBackupRestoreGetNodes;
 extern HrESEBackupPrepare_t HrESEBackupPrepare;
index e2e45e6825396a3185fabef467c096cce90664b8..86043518821bdb18d42b3034f67fff8eab5fc3da 100644 (file)
@@ -456,6 +456,8 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_
          if (result != 0)
          {
             _JobMessage(M_ERROR, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+            _DebugMessage(100, "Calling HrESERestoreClose\n");
+            result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL);
             state = 999;
             break;
          }
@@ -498,6 +500,7 @@ storage_group_node_t::endRestoreFile(exchange_fd_context_t *context)
       context->current_node = parent;
       return bRC_OK;
    case 999:
+      context->current_node = parent;
       return bRC_OK;
    }