]> git.sur5r.net Git - bacula/bacula/commitdiff
kes This patch fixes the infinite loop when trying to increase the
authorKern Sibbald <kern@sibbald.com>
Wed, 14 Nov 2007 07:31:07 +0000 (07:31 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 14 Nov 2007 07:31:07 +0000 (07:31 +0000)
     maximum number of volumes in a Pool during the add command.
     This patch fixes bug #1008.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@5926 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.2.6-add.patch [new file with mode: 0644]
bacula/src/dird/ua_cmds.c
bacula/technotes-2.1

diff --git a/bacula/patches/2.2.6-add.patch b/bacula/patches/2.2.6-add.patch
new file mode 100644 (file)
index 0000000..67e53bd
--- /dev/null
@@ -0,0 +1,35 @@
+
+ This patch fixes the infinite loop when trying to increase the
+ maximum number of volumes in a Pool during the add command.
+ This patch fixes bug #1008. 
+
+ It can be applied to Bacula version 2.2.6 (and probably earlier
+ 2.2.x versions) with:
+
+ cd <bacula-source>
+ ./configure <your options>
+ patch -p0 <2.2.6-add.patch
+ make
+ ...
+ make install
+
+Index: src/dird/ua_cmds.c
+===================================================================
+--- src/dird/ua_cmds.c (revision 5901)
++++ src/dird/ua_cmds.c (working copy)
+@@ -244,12 +244,10 @@
+    while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
+       ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
+-      for (;;) {
+-         if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
+-            return 1;
+-         }
+-         pr.MaxVols = ua->pint32_val;
++      if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
++         return 1;
+       }
++      pr.MaxVols = ua->pint32_val;
+    }
+    /* Get media type */
index ed49b1a3ffe0fd3b6008679920828e36dd738180..5be82afe3a74d48d82a5a19b184f99c9bdd72534 100644 (file)
@@ -244,12 +244,10 @@ static int add_cmd(UAContext *ua, const char *cmd)
 
    while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
       ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
-      for (;;) {
-         if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
-            return 1;
-         }
-         pr.MaxVols = ua->pint32_val;
+      if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
+         return 1;
       }
+      pr.MaxVols = ua->pint32_val;
    }
 
    /* Get media type */
index f231ddbc4f878e943f2dfcc6488aa9278f1dfa62..5531d884b7df27e07b5d969e8225848c3e3b6d0b 100644 (file)
@@ -1,6 +1,11 @@
               Technical notes on version 2.2
 
 General:
+14Nov07
+kes  This patch fixes the infinite loop when trying to increase the
+     maximum number of volumes in a Pool during the add command.
+     This patch fixes bug #1008. 
+          
 Release Version 2.2.6
 09Nov07
 kes  Get fix for joblist bug in bat from trunk.
@@ -35,6 +40,7 @@ kes  Activate Close button on tray-monitor window. This fixes
 kes  Fix spurious warning message printed when creating a volume with
      a LabelFormat. This fixes bug #976.
 
+Release Version 2.2.5
 09Oct07
 kes  Add JobId in place of Job name in all the Jmsg() output.  
 kes  Correct the APP_DESC for the Win32 storage service (remove an e).