]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/1.36.0/1.36.0-autochanger.patch
Cleanup patches a bit
[bacula/bacula] / bacula / patches / 1.36.0 / 1.36.0-autochanger.patch
1
2  This patch should fix a problem where the autochanger thinks
3  a Volume is in the current magazine and loops a few times then
4  gives up.
5
6  Apply it to version 1.36.0 with the following:
7
8  cd <bacula-source>
9  patch -p0 <1.36.0-autochanger.patch
10  make
11  make install
12
13 Index: src/stored/autochanger.c
14 ===================================================================
15 RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
16 retrieving revision 1.23
17 diff -u -r1.23 autochanger.c
18 --- src/stored/autochanger.c    19 Sep 2004 18:56:27 -0000      1.23
19 +++ src/stored/autochanger.c    21 Nov 2004 22:23:26 -0000
20 @@ -52,10 +52,11 @@
21  {
22     JCR *jcr = dcr->jcr;
23     DEVICE *dev = dcr->dev;
24 -   int slot = dcr->VolCatInfo.Slot;
25 +   int slot;
26     int drive = jcr->device->drive_index;
27     int rtn_stat = -1;                /* error status */
28       
29 +   slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
30     /*
31      * Handle autoloaders here. If we cannot autoload it, we
32      *  will return FALSE to ask the sysop.
33 @@ -65,7 +66,7 @@
34          return 0;                    /* For user, bail out right now */
35        }
36        if (dir_find_next_appendable_volume(dcr)) {
37 -        slot = dcr->VolCatInfo.Slot; 
38 +        slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
39        } else {
40          slot = 0;
41        }