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
6 Apply it to version 1.36.0 with the following:
9 patch -p0 <1.36.0-autochanger.patch
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
23 DEVICE *dev = dcr->dev;
24 - int slot = dcr->VolCatInfo.Slot;
26 int drive = jcr->device->drive_index;
27 int rtn_stat = -1; /* error status */
29 + slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
31 * Handle autoloaders here. If we cannot autoload it, we
32 * will return FALSE to ask the sysop.
34 return 0; /* For user, bail out right now */
36 if (dir_find_next_appendable_volume(dcr)) {
37 - slot = dcr->VolCatInfo.Slot;
38 + slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;