bRC
dbi_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp)
{
- _DebugMessage(0, "createFile_DBI state = %d\n", state);
+ _ DebugMessage(100, "createFile_DBI state = %d\n", state);
rp->create_status = CF_EXTRACT;
bRC
dbi_node_t::endRestoreFile(exchange_fd_context_t *context)
{
- _DebugMessage(0, "endRestoreFile_DBI state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_DBI state = %d\n", state);
context->current_node = parent;
context->notrunconfull_option = false;
context->plugin_active = false;
bfuncs->getBaculaValue(ctx, bVarJobId, (void *)&JobId);
- _DebugMessage(0, "newPlugin JobId=%d\n", JobId);
+ _DebugMessage(100, "newPlugin JobId=%d\n", JobId);
bfuncs->registerBaculaEvents(ctx, 1, 2, 0);
size = MAX_COMPUTERNAME_LENGTH + 1;
context->computer_name = new WCHAR[size];
switch (event->eventType) {
case bEventJobStart:
- _DebugMessage(0, "JobStart=%s\n", (char *)value);
+ _DebugMessage(100, "JobStart=%s\n", (char *)value);
context->plugin_active = false;
break;
case bEventJobEnd:
- _DebugMessage(0, "JobEnd\n");
+ _DebugMessage(100, "JobEnd\n");
break;
case bEventPluginCommand:
- _DebugMessage(0, "bEventPluginCommand %s\n", value);
+ _DebugMessage(100, "bEventPluginCommand %s\n", value);
command = bstrdup((char *)value);
/* this isn't really unused */
plugin_name = strtok((char *)command, ":");
if (!context->plugin_active) {
break;
}
- _DebugMessage(0, "BackupStart\n");
+ _DebugMessage(100, "BackupStart\n");
bfuncs->getBaculaValue(ctx, bVarAccurate, (void *)&accurate);
context->accurate = accurate;
context->job_type = JOB_TYPE_BACKUP;
context->truncate_logs = false;
break;
default:
- _DebugMessage(0, "Invalid job level %c\n", context->job_level);
+ _DebugMessage(100, "Invalid job level %c\n", context->job_level);
return bRC_Error;
}
break;
case bEventEndBackupJob:
- _DebugMessage(0, "BackupEnd\n");
+ _DebugMessage(100, "BackupEnd\n");
if (!context->plugin_active) {
break;
}
break;
}
intval = (intptr_t)value;
- _DebugMessage(0, "JobLevel=%c %d\n", intval, intval);
+ _DebugMessage(100, "JobLevel=%c %d\n", intval, intval);
context->job_level = intval;
break;
case bEventSince:
break;
}
intval = (intptr_t)value;
- _DebugMessage(0, "since=%d\n", intval);
+ _DebugMessage(100, "since=%d\n", intval);
context->job_since = (time_t)value;
break;
case bEventStartRestoreJob:
- _DebugMessage(0, "StartRestoreJob\n");
+ _DebugMessage(100, "StartRestoreJob\n");
context->job_type = JOB_TYPE_RESTORE;
context->plugin_active = true;
break;
if (!context->plugin_active) {
break;
}
- _DebugMessage(0, "EndRestoreJob\n");
+ _DebugMessage(100, "EndRestoreJob\n");
context->plugin_active = false;
break;
/* Plugin command e.g. plugin = <plugin-name>:<name-space>:command */
case bEventRestoreCommand:
- _DebugMessage(0, "restore\n"); // command=%s\n", (char *)value);
+ _DebugMessage(100, "restore\n"); // command=%s\n", (char *)value);
if (!context->plugin_active) {
break;
}
break;
}
{
- _DebugMessage(0, "backup command=%s\n", (char *)value);
+ _DebugMessage(100, "backup command=%s\n", (char *)value);
char *command = new char[strlen((char *)value) + 1];
strcpy(command, (char *)value);
char *plugin_name = strtok((char *)command, ":");
_JobMessage(M_WARNING, "Unknown plugin option '%s'\n", option);
}
}
- _DebugMessage(0, "name = %s\n", plugin_name);
- _DebugMessage(0, "path = %s\n", path);
+ _DebugMessage(100, "name = %s\n", plugin_name);
+ _DebugMessage(100, "path = %s\n", path);
if (*path != '/') {
_JobMessage(M_FATAL, "Path does not begin with a '/'\n");
return bRC_Error;
break;
default:
- _DebugMessage(0, "Ignored event=%d\n", event->eventType);
+ _DebugMessage(100, "Ignored event=%d\n", event->eventType);
break;
}
bfuncs->getBaculaValue(ctx, bVarFDName, (void *)&name);
/* previous files are always Seen */
return bRC_Seen;
}
-
{
//HrESERestoreOpenFile with name of log file
- _DebugMessage(0, "createFile_FILE state = %d\n", state);
+ _ DebugMessage(100, "createFile_FILE state = %d\n", state);
rp->create_status = CF_EXTRACT;
return bRC_OK;
}
bRC
file_node_t::endRestoreFile(exchange_fd_context_t *context)
{
- _DebugMessage(0, "endRestoreFile_FILE state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_FILE state = %d\n", state);
context->current_node = parent;
return bRC_OK;
}
char *tmp = new char[wcslen(filename) + 1];
wcstombs(tmp, filename, wcslen(filename) + 1);
- _DebugMessage(0, "pluginIoOpen_FILE - filename = %s\n", tmp);
+ _ DebugMessage(100, "pluginIoOpen_FILE - filename = %s\n", tmp);
io->status = 0;
io->io_errno = 0;
if (context->job_type == JOB_TYPE_BACKUP)
bRC
root_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp)
{
- _DebugMessage(0, "createFile_ROOT state = %d\n", state);
+ _ DebugMessage(100, "createFile_ROOT state = %d\n", state);
switch (state) {
case 0:
if (strcmp(name, PLUGIN_PATH_PREFIX_BASE) != 0) {
bRC
root_node_t::endRestoreFile(exchange_fd_context_t *context)
{
- _DebugMessage(0, "endRestoreFile_ROOT state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_ROOT state = %d\n", state);
switch (state) {
case 0:
delete service_node;
{
storage_group_node_t *curr_sg, *prev_sg;
- _DebugMessage(0, "createFile_SERVICE state = %d\n", state);
+ _ DebugMessage(100, "createFile_SERVICE state = %d\n", state);
if (strcmp(name, "Microsoft Information Store") != 0)
{
_JobMessage(M_FATAL, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/'\n", state);
bRC
service_node_t::endRestoreFile(exchange_fd_context_t *context)
{
- _DebugMessage(0, "endRestoreFile_SERVICE state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_SERVICE state = %d\n", state);
switch(state)
{
case 0:
HRESULT result;
int len;
- _DebugMessage(0, "createFile_STORAGE_GROUP state = %d\n", state);
+ _ DebugMessage(100, "createFile_STORAGE_GROUP state = %d\n", state);
if (strcmp(context->path_bits[level], name) != 0)
{
- _DebugMessage(0, "Different storage group - switching back to parent\n", state);
+ _ DebugMessage(100, "Different storage group - switching back to parent\n", state);
saved_log_path = new WCHAR[wcslen(restore_environment->m_wszRestoreLogPath) + 1];
wcscpy(saved_log_path, restore_environment->m_wszRestoreLogPath);
_DebugMessage(100, "Calling HrESERestoreSaveEnvironment\n");
}
if (saved_log_path != NULL)
{
- _DebugMessage(0, "Calling HrESERestoreReopen\n");
+ _ DebugMessage(100, "Calling HrESERestoreReopen\n");
result = HrESERestoreReopen(context->computer_name, service_name, saved_log_path, &hccx);
if (result != 0)
{
rp->create_status = CF_CREATED;
return bRC_OK;
}
- _DebugMessage(0, "Calling HrESERestoreGetEnvironment\n");
+ _ DebugMessage(100, "Calling HrESERestoreGetEnvironment\n");
result = HrESERestoreGetEnvironment(hccx, &restore_environment);
if (result != 0)
{
storage_group_name = new WCHAR[strlen(name) + 1];
mbstowcs(service_name, parent->name, strlen(parent->name) + 1);
mbstowcs(storage_group_name, name, strlen(name) + 1);
- _DebugMessage(0, "Calling HrESERestoreOpen\n");
+ _ DebugMessage(100, "Calling HrESERestoreOpen\n");
result = HrESERestoreOpen(context->computer_name, service_name, storage_group_name, NULL, &hccx);
if (result != 0)
{
state = 999;
break;
}
- _DebugMessage(0, "Calling HrESERestoreGetEnvironment\n");
+ _ DebugMessage(100, "Calling HrESERestoreGetEnvironment\n");
result = HrESERestoreGetEnvironment(hccx, &restore_environment);
if (result != 0)
{
bRC
storage_group_node_t::endRestoreFile(exchange_fd_context_t *context)
{
- _DebugMessage(0, "endRestoreFile_STORAGE_GROUP state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_STORAGE_GROUP state = %d\n", state);
switch (state)
{
case 0:
bRC
store_node_t::createFile(exchange_fd_context_t *context, struct restore_pkt *rp)
{
- _DebugMessage(0, "createFile_STORE state = %d\n", state);
+ _ DebugMessage(100, "createFile_STORE state = %d\n", state);
if (strcmp(context->path_bits[level - 1], parent->name) != 0)
{
- _DebugMessage(0, "Different storage group - switching back to parent\n", state);
+ _ DebugMessage(100, "Different storage group - switching back to parent\n", state);
context->current_node = parent;
return bRC_OK;
}
case 999:
if (strcmp(context->path_bits[level], name) != 0)
{
- _DebugMessage(0, "End of Store when in error state - switching back to parent\n", state);
+ _ DebugMessage(100, "End of Store when in error state - switching back to parent\n", state);
context->current_node = parent;
return bRC_OK;
}
{
HRESULT result;
- _DebugMessage(0, "endRestoreFile_STORE state = %d\n", state);
+ _ DebugMessage(100, "endRestoreFile_STORE state = %d\n", state);
for (;;)
{
switch (state)
{
case 0:
state = 1;
- _DebugMessage(0, "Calling HrESERestoreAddDatabase\n");
+ _ DebugMessage(100, "Calling HrESERestoreAddDatabase\n");
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)
{