]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/1.34.6/1.34.6-poll.patch
ebl cleanup patch
[bacula/bacula] / bacula / patches / 1.34.6 / 1.34.6-poll.patch
1
2 This patch fixes two bugs:
3 1. It ignores an device open failure if polling.
4 2. It disables the insanity check on reading the 
5    tape label while polling. Normally the check
6    doesn't allow the label to be read more than 100
7    times.
8
9 Apply the patch to version 1.34.6 (possibly earlier versions) with:
10
11  cd <bacula-source>
12  patch -p0 <1.34.6-poll.patch
13  make
14  ...
15
16 Index: src/stored/label.c
17 ===================================================================
18 RCS file: /cvsroot/bacula/bacula/src/stored/label.c,v
19 retrieving revision 1.42.2.1
20 diff -u -r1.42.2.1 label.c
21 --- src/stored/label.c  20 Jun 2004 11:43:04 -0000      1.42.2.1
22 +++ src/stored/label.c  2 Sep 2004 12:21:00 -0000
23 @@ -74,8 +74,8 @@
24           * Cancel Job if too many label errors
25           *  => we are in a loop
26           */
27 -        if (jcr->label_errors++ > 100) {
28 -            Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
29 +        if (!dev->poll && jcr->label_errors++ > 100) {
30 +            Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
31          }
32          return jcr->label_status = VOL_NAME_ERROR;
33        }
34 @@ -157,8 +157,8 @@
35         * Cancel Job if too many label errors
36         *  => we are in a loop
37         */
38 -      if (jcr->label_errors++ > 100) {
39 -         Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
40 +      if (!dev->poll && jcr->label_errors++ > 100) {
41 +         Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
42        }
43        return jcr->label_status = VOL_NAME_ERROR;
44     }
45 Index: src/stored/mount.c
46 ===================================================================
47 RCS file: /cvsroot/bacula/bacula/src/stored/mount.c,v
48 retrieving revision 1.59.2.1
49 diff -u -r1.59.2.1 mount.c
50 --- src/stored/mount.c  20 Jun 2004 11:43:04 -0000      1.59.2.1
51 +++ src/stored/mount.c  2 Sep 2004 12:21:00 -0000
52 @@ -154,7 +154,11 @@
53  
54     /* Ensure the device is open */
55     if (!open_device(jcr, dev)) {
56 -      return 0;
57 +      if (dev->poll) {
58 +        goto mount_next_vol;
59 +      } else {
60 +        return 0;
61 +      }
62     }
63  
64     /*