From: Kern Sibbald Date: Wed, 14 Nov 2007 07:31:07 +0000 (+0000) Subject: kes This patch fixes the infinite loop when trying to increase the X-Git-Tag: Release-2.2.7~41 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ee880bd17c6ce538c34494a9914acaac99d712d;p=bacula%2Fbacula 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. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@5926 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/2.2.6-add.patch b/bacula/patches/2.2.6-add.patch new file mode 100644 index 0000000000..67e53bdcdc --- /dev/null +++ b/bacula/patches/2.2.6-add.patch @@ -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 + ./configure + 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 */ diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index ed49b1a3ff..5be82afe3a 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -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 */ diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index f231ddbc4f..5531d884b7 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -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).