]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.2.x/2.2.1-restore.patch
Update patches
[bacula/bacula] / bacula / patches / 2.2.x / 2.2.1-restore.patch
1 Index: fd_cmds.c
2 ===================================================================
3 --- fd_cmds.c   (.../tags/Release-2.2.1/bacula/src/stored)      (revision 5508)
4 +++ fd_cmds.c   (.../branches/Branch-2.2/bacula/src/stored)     (revision 5508)
5 @@ -1,18 +1,4 @@
6  /*
7 - * This file handles commands from the File daemon.
8 - *
9 - *  Kern Sibbald, MM
10 - *
11 - * We get here because the Director has initiated a Job with
12 - *  the Storage daemon, then done the same with the File daemon,
13 - *  then when the Storage daemon receives a proper connection from
14 - *  the File daemon, control is passed here to handle the
15 - *  subsequent File daemon commands.
16 - *
17 - *   Version $Id$
18 - *
19 - */
20 -/*
21     Bacula® - The Network Backup Solution
22  
23     Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
24 @@ -39,6 +25,20 @@
25     (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26     Switzerland, email:ftf@fsfeurope.org.
27  */
28 +/*
29 + * This file handles commands from the File daemon.
30 + *
31 + *  Kern Sibbald, MM
32 + *
33 + * We get here because the Director has initiated a Job with
34 + *  the Storage daemon, then done the same with the File daemon,
35 + *  then when the Storage daemon receives a proper connection from
36 + *  the File daemon, control is passed here to handle the
37 + *  subsequent File daemon commands.
38 + *
39 + *   Version $Id$
40 + *
41 + */
42  
43  #include "bacula.h"
44  #include "stored.h"
45 Index: bscan.c
46 ===================================================================
47 --- bscan.c     (.../tags/Release-2.2.1/bacula/src/stored)      (revision 5508)
48 +++ bscan.c     (.../branches/Branch-2.2/bacula/src/stored)     (revision 5508)
49 @@ -326,6 +326,7 @@
50        mdcr->StartFile = dcr->StartFile;
51        mdcr->EndBlock = dcr->EndBlock;
52        mdcr->EndFile = dcr->EndFile;
53 +      mdcr->VolMediaId = dcr->VolMediaId;
54        mjcr->read_dcr->VolLastIndex = dcr->VolLastIndex;
55        if (!create_jobmedia_record(db, mjcr)) {
56           Pmsg2(000, _("Could not create JobMedia record for Volume=%s Job=%s\n"),
57 @@ -476,6 +477,7 @@
58              dcr->VolFirstIndex = dcr->FileIndex = 0;
59              dcr->StartBlock = dcr->EndBlock = 0;
60              dcr->StartFile = dcr->EndFile = 0;
61 +            dcr->VolMediaId = 0;
62           }
63  
64           Pmsg1(000, _("VOL_LABEL: OK for Volume: %s\n"), mr.VolumeName);
65 @@ -1177,6 +1179,7 @@
66  
67     dcr->EndBlock = dev->EndBlock;
68     dcr->EndFile  = dev->EndFile;
69 +   dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
70  
71     memset(&jmr, 0, sizeof(jmr));
72     jmr.JobId = mjcr->JobId;
73 Index: askdir.c
74 ===================================================================
75 --- askdir.c    (.../tags/Release-2.2.1/bacula/src/stored)      (revision 5508)
76 +++ askdir.c    (.../branches/Branch-2.2/bacula/src/stored)     (revision 5508)
77 @@ -398,7 +398,7 @@
78        dcr->StartFile, dcr->EndFile,
79        dcr->StartBlock, dcr->EndBlock, 
80        dcr->Copy, dcr->Stripe, 
81 -      edit_uint64(dcr->dev->VolCatInfo.VolMediaId, ed1));
82 +      edit_uint64(dcr->VolMediaId, ed1));
83      Dmsg1(100, ">dird: %s", dir->msg);
84     if (bnet_recv(dir) <= 0) {
85        Dmsg0(190, "create_jobmedia error bnet_recv\n");
86 Index: dev.h
87 ===================================================================
88 --- dev.h       (.../tags/Release-2.2.1/bacula/src/stored)      (revision 5508)
89 +++ dev.h       (.../branches/Branch-2.2/bacula/src/stored)     (revision 5508)
90 @@ -447,6 +447,7 @@
91     uint32_t StartFile;                /* Start write file */
92     uint32_t StartBlock;               /* Start write block */
93     uint32_t EndBlock;                 /* Ending block written */
94 +   int64_t  VolMediaId;               /* MediaId */
95     int64_t job_spool_size;            /* Current job spool size */
96     int64_t max_job_spool_size;        /* Max job spool size */
97     char VolumeName[MAX_NAME_LENGTH];  /* Volume name */
98 Index: block.c
99 ===================================================================
100 --- block.c     (.../tags/Release-2.2.1/bacula/src/stored)      (revision 5508)
101 +++ block.c     (.../branches/Branch-2.2/bacula/src/stored)     (revision 5508)
102 @@ -611,6 +611,7 @@
103        dev->block_num = dcr->EndBlock;
104        dev->file = dcr->EndFile;
105     }
106 +   dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
107     if (dcr->VolFirstIndex == 0 && block->FirstIndex > 0) {
108        dcr->VolFirstIndex = block->FirstIndex;
109     }
110 @@ -1098,6 +1099,7 @@
111        dev->block_num = dcr->EndBlock;
112        dev->file = dcr->EndFile;
113     }
114 +   dcr->VolMediaId = dev->VolCatInfo.VolMediaId;
115     dev->file_addr += block->read_len;
116     dev->file_size += block->read_len;
117