From c4490f3291cc459634250402dea17833a9074735 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 16 Apr 2010 20:56:14 +0200 Subject: [PATCH] Tweak new restore object code --- bacula/src/dird/fd_cmds.c | 2 +- bacula/src/filed/job.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index 94b58dd220..437e095bc3 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -706,7 +706,7 @@ bool send_restore_objects(JCR *jcr) return true; } Mmsg(query, "SELECT JobId,ObjectLength,ObjectIndex,ObjectType," - "FileIndex,Fname,RestoreObject FROM RestoreObject " + "FileIndex,ObjectName,RestoreObject FROM RestoreObject " "WHERE JobId IN (%s) ORDER BY ObjectIndex ASC", jcr->JobIds); /* restore_object_handler is called for each file found */ diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 9fa5df46cd..fd45d5da06 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -645,26 +645,24 @@ static int restore_object_cmd(JCR *jcr) goto bail_out; } -// Dmsg5(000, "Recv object: JobId=%u objlen=%d objinx=%d objtype=%d FI=%d\n", -// JobId, object_len, object_index, object_type, FileIndex); + Dmsg5(100, "Recv object: JobId=%u objlen=%d objinx=%d objtype=%d FI=%d\n", + rop.JobId, rop.object_len, rop.object_index, rop.object_type, FileIndex); /* Read Object name */ if (dir->recv() < 0) { goto bail_out; } -// Dmsg2(000, "Recv Fname object: len=%d Oname=%s\n", dir->msglen, dir->msg); + Dmsg2(100, "Recv Oname object: len=%d Oname=%s\n", dir->msglen, dir->msg); rop.object_name = bstrdup(dir->msg); -// Dmsg2(000, "Recv Path object: len=%d Path=%s\n", dir->msglen, dir->msg); - /* Read Object */ if (dir->recv() < 0) { goto bail_out; } rop.object = dir->msg; -// Dmsg2(000, "Recv Object: len=%d Object=%s\n", dir->msglen, dir->msg); + Dmsg2(100, "Recv Object: len=%d Object=%s\n", dir->msglen, dir->msg); if (strcmp(rop.object_name, "job_metadata.xml") == 0) { - Dmsg0(000, "got job metadata\n"); + Dmsg0(100, "got job metadata\n"); free_and_null_pool_memory(jcr->job_metadata); jcr->job_metadata = rop.object; rop.object = NULL; -- 2.39.5