From 2a58c8ec568e2ddcd7915c0cd1441bfe7371c011 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 21 Jan 2010 17:36:37 +0100 Subject: [PATCH] Fix Exchange plugin to stop on error. Fixes bug #1442 --- bacula/src/win32/filed/plugins/api.c | 9 +++--- bacula/src/win32/filed/plugins/dbi_node.c | 4 +-- bacula/src/win32/filed/plugins/exchange-fd.c | 13 ++++---- bacula/src/win32/filed/plugins/file_node.c | 14 ++++----- bacula/src/win32/filed/plugins/node.c | 2 +- bacula/src/win32/filed/plugins/root_node.c | 14 ++++----- bacula/src/win32/filed/plugins/service_node.c | 12 ++++---- .../win32/filed/plugins/storage_group_node.c | 30 +++++++++---------- bacula/src/win32/filed/plugins/store_node.c | 6 ++-- 9 files changed, 53 insertions(+), 51 deletions(-) diff --git a/bacula/src/win32/filed/plugins/api.c b/bacula/src/win32/filed/plugins/api.c index 1efb35b488..bbd3fb6ac7 100644 --- a/bacula/src/win32/filed/plugins/api.c +++ b/bacula/src/win32/filed/plugins/api.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2009 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -64,7 +64,7 @@ loadExchangeApi() status = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\DLLPaths", &key_handle); if (status != ERROR_SUCCESS) { - _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status); + _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status); return bRC_Error; } @@ -72,7 +72,7 @@ loadExchangeApi() status = RegQueryValueExW(key_handle, L"esebcli2", NULL, &type, NULL, &buf_len); if (status != ERROR_SUCCESS) { - _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status); + _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status); return bRC_Error; } buf_len += 2; @@ -82,7 +82,7 @@ loadExchangeApi() status = RegQueryValueExW(key_handle, L"esebcli2", NULL, &type, (LPBYTE)buf, &buf_len); if (status != ERROR_SUCCESS) { - _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status); + _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status); delete buf; return bRC_Error; } @@ -94,6 +94,7 @@ printf("Got value %S\n", buf); h = LoadLibraryW(buf); delete buf; if (!h) { + _JobMessageNull(M_FATAL, "Cannot load Exchange DLL\n"); return bRC_Error; } HrESEBackupRestoreGetNodes = (HrESEBackupRestoreGetNodes_t)GetProcAddress(h, "HrESEBackupRestoreGetNodes"); diff --git a/bacula/src/win32/filed/plugins/dbi_node.c b/bacula/src/win32/filed/plugins/dbi_node.c index 05f3efcdaf..7f46b13621 100644 --- a/bacula/src/win32/filed/plugins/dbi_node.c +++ b/bacula/src/win32/filed/plugins/dbi_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -285,7 +285,7 @@ dbi_node_t::pluginIoClose(exchange_fd_context_t *context, struct io_pkt *io) buffer = NULL; return bRC_OK; restore_fail: - _JobMessage(M_ERROR, "Format of %s is incorrect", full_path); + _JobMessage(M_FATAL, "Format of %s is incorrect", full_path); delete buffer; buffer = NULL; return bRC_Error; diff --git a/bacula/src/win32/filed/plugins/exchange-fd.c b/bacula/src/win32/filed/plugins/exchange-fd.c index fa97f97194..8947d5294e 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.c +++ b/bacula/src/win32/filed/plugins/exchange-fd.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2009 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -296,7 +296,7 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) _DebugMessage(0, "path = %s\n", path); if (*path != '/') { - _JobMessage(M_ERROR, "Path does not begin with a '/'\n"); + _JobMessage(M_FATAL, "Path does not begin with a '/'\n"); return bRC_Error; } @@ -313,7 +313,7 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) if (i < 2 || i > 4) { - _JobMessage(M_ERROR, "Invalid plugin backup path\n"); + _JobMessage(M_FATAL, "Invalid plugin backup path\n"); return bRC_Error; } context->root_node = new root_node_t(context->path_bits[0]); @@ -323,7 +323,7 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) break; default: - _JobMessage(M_ERROR, "unknown event=%d\n", event->eventType); + _JobMessage(M_FATAL, "unknown event=%d\n", event->eventType); } bfuncs->getBaculaValue(ctx, bVarFDName, (void *)&name); return bRC_OK; @@ -381,7 +381,7 @@ static bRC pluginIO(bpContext *ctx, struct io_pkt *io) if (io->pkt_size != sizeof(struct io_pkt) || io->pkt_end != sizeof(struct io_pkt)) { - _JobMessage(M_ERROR, "io_pkt size mismatch - sizeof(struct io_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct io_pkt), io->pkt_size, io->pkt_end); + _JobMessage(M_FATAL, "io_pkt size mismatch - sizeof(struct io_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct io_pkt), io->pkt_size, io->pkt_end); } switch(io->func) { @@ -442,7 +442,8 @@ static bRC createFile(bpContext *ctx, struct restore_pkt *rp) _DebugMessage(100, "createFile - type = %d, ofname = %s\n", rp->type, rp->ofname); if (rp->pkt_size != sizeof(struct restore_pkt) || rp->pkt_end != sizeof(struct restore_pkt)) { - _JobMessage(M_ERROR, "restore_pkt size mismatch - sizeof(struct restore_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct restore_pkt), rp->pkt_size, rp->pkt_end); + _JobMessage(M_FATAL, "restore_pkt size mismatch - sizeof(struct restore_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct restore_pkt), rp->pkt_size, rp->pkt_end); + return bRC_Error; } for (i = 0; i < 6; i++) diff --git a/bacula/src/win32/filed/plugins/file_node.c b/bacula/src/win32/filed/plugins/file_node.c index e382d8b12d..3f3625d3fa 100644 --- a/bacula/src/win32/filed/plugins/file_node.c +++ b/bacula/src/win32/filed/plugins/file_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -127,7 +127,7 @@ file_node_t::pluginIoOpen(exchange_fd_context_t *context, struct io_pkt *io) result = HrESEBackupOpenFile(hccx, filename, 65535, 1, &backup_file_handle, §ion_size); if (result) { - _JobMessage(M_ERROR, "HrESEBackupOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); backup_file_handle = INVALID_HANDLE_VALUE; io->io_errno = 1; return bRC_Error; @@ -144,7 +144,7 @@ file_node_t::pluginIoOpen(exchange_fd_context_t *context, struct io_pkt *io) handle = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (handle == INVALID_HANDLE_VALUE) { - _JobMessage(M_ERROR, "CreateFile failed"); + _JobMessage(M_FATAL, "CreateFile failed"); return bRC_Error; } restore_file_handle = (void *)handle; @@ -152,13 +152,13 @@ file_node_t::pluginIoOpen(exchange_fd_context_t *context, struct io_pkt *io) } else if (result == 0) { - _JobMessage(M_ERROR, "Exchange File IO API not yet supported for restore\n"); + _JobMessage(M_FATAL, "Exchange File IO API not yet supported for restore\n"); restore_at_file_level = false; return bRC_Error; } else { - _JobMessage(M_ERROR, "HrESERestoreOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); return bRC_Error; } } @@ -196,13 +196,13 @@ file_node_t::pluginIoWrite(exchange_fd_context_t *context, struct io_pkt *io) if (!WriteFile(restore_file_handle, io->buf, io->count, &bytes_written, NULL)) { - _JobMessage(M_ERROR, "Write Error"); + _JobMessage(M_FATAL, "Write Error"); return bRC_Error; } if (bytes_written != (DWORD)io->count) { - _JobMessage(M_ERROR, "Short write"); + _JobMessage(M_FATAL, "Short write"); return bRC_Error; } io->status = bytes_written; diff --git a/bacula/src/win32/filed/plugins/node.c b/bacula/src/win32/filed/plugins/node.c index b9433f4986..4007c7e281 100644 --- a/bacula/src/win32/filed/plugins/node.c +++ b/bacula/src/win32/filed/plugins/node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. diff --git a/bacula/src/win32/filed/plugins/root_node.c b/bacula/src/win32/filed/plugins/root_node.c index 60457f227a..2e672e26e9 100644 --- a/bacula/src/win32/filed/plugins/root_node.c +++ b/bacula/src/win32/filed/plugins/root_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -52,7 +52,7 @@ root_node_t::startBackupFile(exchange_fd_context_t *context, struct save_pkt *sp case 0: if (strcmp(PLUGIN_PATH_PREFIX_BASE, name) != 0) { - _JobMessage(M_ERROR, "Invalid backup path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n"); + _JobMessage(M_FATAL, "Invalid backup path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n"); state = 999; return bRC_Error; } @@ -77,7 +77,7 @@ root_node_t::startBackupFile(exchange_fd_context_t *context, struct save_pkt *sp case 999: return bRC_Error; default: - _JobMessage(M_ERROR, "Invalid state %d", state); + _JobMessage(M_FATAL, "Invalid internal state %d", state); state = 999; } return retval; @@ -102,7 +102,7 @@ root_node_t::endBackupFile(exchange_fd_context_t *context) case 999: retval = bRC_Error; default: - _JobMessage(M_ERROR, "Invalid state %d", state); + _JobMessage(M_FATAL, "Invalid internal state %d", state); state = 999; return bRC_Error; } @@ -118,7 +118,7 @@ root_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp) case 0: if (strcmp(name, PLUGIN_PATH_PREFIX_BASE) != 0) { - _JobMessage(M_ERROR, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n"); + _JobMessage(M_FATAL, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n"); state = 999; return bRC_Error; } @@ -131,7 +131,7 @@ root_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp) case 999: return bRC_Error; default: - _JobMessage(M_ERROR, "Invalid state %d", state); + _JobMessage(M_FATAL, "Invalid internal state %d", state); state = 999; } return bRC_Error; @@ -150,7 +150,7 @@ root_node_t::endRestoreFile(exchange_fd_context_t *context) case 1: return bRC_OK; default: - _JobMessage(M_ERROR, "Invalid state %d", state); + _JobMessage(M_FATAL, "Invalid internal state %d", state); state = 999; } return bRC_Error; diff --git a/bacula/src/win32/filed/plugins/service_node.c b/bacula/src/win32/filed/plugins/service_node.c index 03b89125b3..68f5335176 100644 --- a/bacula/src/win32/filed/plugins/service_node.c +++ b/bacula/src/win32/filed/plugins/service_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -56,7 +56,7 @@ service_node_t::startBackupFile(exchange_fd_context_t *context, struct save_pkt case 0: if (strcmp(PLUGIN_PATH_PREFIX_SERVICE, name) != 0) { - _JobMessage(M_ERROR, "Invalid restore path specified, must start with /" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/\n"); + _JobMessage(M_FATAL, "Invalid restore path specified, must start with /" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/\n"); return bRC_Error; } // convert name to a wide string @@ -67,7 +67,7 @@ service_node_t::startBackupFile(exchange_fd_context_t *context, struct save_pkt result = HrESEBackupPrepare(context->computer_name, PLUGIN_PATH_PREFIX_SERVICE_W, &ibi_count, &ibi, &hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupPrepare failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupPrepare failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); return bRC_Error; } state = 1; @@ -99,7 +99,7 @@ service_node_t::startBackupFile(exchange_fd_context_t *context, struct save_pkt delete tmp; if (current_ibi == ibi_count) { - _JobMessage(M_ERROR, "Invalid Storage Group '%s'\n", context->path_bits[level + 1]); + _JobMessage(M_FATAL, "Invalid Storage Group '%s'\n", context->path_bits[level + 1]); return bRC_Error; } _DebugMessage(100, "storage group name = %s\n", first_storage_group_node->name); @@ -155,7 +155,7 @@ service_node_t::endBackupFile(exchange_fd_context_t *context) result = HrESEBackupEnd(hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); return bRC_Error; } @@ -174,7 +174,7 @@ service_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *r _DebugMessage(0, "createFile_SERVICE state = %d\n", state); if (strcmp(name, "Microsoft Information Store") != 0) { - _JobMessage(M_ERROR, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/'\n", state); + _JobMessage(M_FATAL, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/'\n", state); return bRC_Error; } for(;;) diff --git a/bacula/src/win32/filed/plugins/storage_group_node.c b/bacula/src/win32/filed/plugins/storage_group_node.c index 8604351882..528a287cfa 100644 --- a/bacula/src/win32/filed/plugins/storage_group_node.c +++ b/bacula/src/win32/filed/plugins/storage_group_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -86,7 +86,7 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav } if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupSetup failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupSetup failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; return bRC_Error; } @@ -118,7 +118,7 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav } if (current_dbi == ibi->cDatabase) { - _JobMessage(M_ERROR, "Invalid Database '%s'\n", context->path_bits[level + 1]); + _JobMessage(M_FATAL, "Invalid Database '%s'\n", context->path_bits[level + 1]); return bRC_Error; } store_node = new store_node_t(tmp, this); @@ -134,7 +134,7 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav result = HrESEBackupGetLogAndPatchFiles(hccx, &tmp_logfiles); if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupGetLogAndPatchFiles failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupGetLogAndPatchFiles failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); return bRC_Error; } for (len = 0, tmp_logfile_ptr = tmp_logfiles; *tmp_logfile_ptr != 0; tmp_logfile_ptr += wcslen(tmp_logfile_ptr) + 1) @@ -275,7 +275,7 @@ storage_group_node_t::endBackupFile(exchange_fd_context_t *context) result = HrESEBackupTruncateLogs(hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupTruncateLogs failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupTruncateLogs failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); } else { @@ -290,7 +290,7 @@ storage_group_node_t::endBackupFile(exchange_fd_context_t *context) result = HrESEBackupInstanceEnd(hccx, ESE_BACKUP_INSTANCE_END_SUCCESS); if (result != 0) { - _JobMessage(M_ERROR, "HrESEBackupInstanceEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESEBackupInstanceEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); return bRC_Error; } retval = bRC_OK; @@ -317,7 +317,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreSaveEnvironment(hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; rp->create_status = CF_CREATED; return bRC_OK; @@ -326,7 +326,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; rp->create_status = CF_CREATED; return bRC_OK; @@ -340,7 +340,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreReopen(context->computer_name, service_name, saved_log_path, &hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreReopen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreReopen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; saved_log_path = NULL; rp->create_status = CF_CREATED; @@ -350,7 +350,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreGetEnvironment(hccx, &restore_environment); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; saved_log_path = NULL; rp->create_status = CF_CREATED; @@ -378,7 +378,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreOpen(context->computer_name, service_name, storage_group_name, NULL, &hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreOpen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreOpen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; break; } @@ -386,7 +386,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreGetEnvironment(hccx, &restore_environment); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; break; } @@ -445,7 +445,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreSaveEnvironment(hccx); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; break; } @@ -455,7 +455,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ restore_environment->m_wszRestoreLogPath, storage_group_name, ESE_RESTORE_COMPLETE_ATTACH_DBS); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); _DebugMessage(100, "Calling HrESERestoreClose\n"); result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL); state = 999; @@ -470,7 +470,7 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; break; } diff --git a/bacula/src/win32/filed/plugins/store_node.c b/bacula/src/win32/filed/plugins/store_node.c index 8470b1c202..2fa5b8ebf0 100644 --- a/bacula/src/win32/filed/plugins/store_node.c +++ b/bacula/src/win32/filed/plugins/store_node.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2008-2008 Free Software Foundation Europe e.V. + Copyright (C) 2008-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -146,7 +146,7 @@ store_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp) case 0: if (strcmp("DatabaseBackupInfo", context->path_bits[level + 1]) != 0) { - _JobMessage(M_ERROR, "DatabaseBackupInfo file must exist and must be first in directory\n"); + _JobMessage(M_FATAL, "DatabaseBackupInfo file must exist and must be first in directory\n"); state = 999; break; } @@ -216,7 +216,7 @@ store_node_t::endRestoreFile(exchange_fd_context_t *context) result = HrESERestoreAddDatabase(hccx, dbi_node->restore_display_name, dbi_node->restore_guid, dbi_node->restore_input_streams, &dbi_node->restore_output_streams); if (result != 0) { - _JobMessage(M_ERROR, "HrESERestoreAddDatabase failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); + _JobMessage(M_FATAL, "HrESERestoreAddDatabase failed with error 0x%08x - %s\n", result, ESEErrorMessage(result)); state = 999; break; } -- 2.39.5