--- /dev/null
+               Patch notes for version 3.0
+
+
+Patches Committed:
+3.0.0-read-vol-list.patch
 
+++ /dev/null
-               Patch notes for version 3.0
-
-
-Patches Committed:
 
+++ /dev/null
-
- This patch fixes bat.pro.in so that bat will install correctly.
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-bat-install.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/qt-console/bat.pro.in
-===================================================================
---- src/qt-console/bat.pro.in  (revision 8326)
-+++ src/qt-console/bat.pro.in  (working copy)
-@@ -9,9 +9,9 @@
- #    
- CONFIG += qt debug @QWT@
- 
--bins.path = /$(DESTDIR)@sbindir@
-+bins.path = $(DESTDIR)@sbindir@
- bins.files = ./bat
--confs.path = /$(DESTDIR)@sysconfdir@
-+confs.path = $(DESTDIR)@sysconfdir@
- confs.commands = ./install_conf_file   
- 
- TEMPLATE     = app
 
+++ /dev/null
-
- This patch fixes bug #1255 'variable %n changed'
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-jobname-edit.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/dird/job.c
-===================================================================
---- src/dird/job.c     (revision 8455)
-+++ src/dird/job.c     (working copy)
-@@ -787,7 +787,7 @@
-    len = strlen(dt) + 5;   /* dt + .%02d EOS */
-    bstrncpy(name, base_name, sizeof(name));
-    name[sizeof(name)-len] = 0;          /* truncate if too long */
--   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s.%02d", name, dt, seq); /* add date & time */
-+   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s_%02d", name, dt, seq); /* add date & time */
-    /* Convert spaces into underscores */
-    for (p=jcr->Job; *p; p++) {
-       if (*p == ' ') {
 
+++ /dev/null
-                                                             [label-failure.patch] IQ
- This patch should fix the problems labeling a tape while
- Bacula is requesting you to mount or label a new tape.
- It should also fix problems where Bacula will not recognize
- that a new tape is inserted or created and it keeps asking for
- a different tape. It fixes bug #1227.
-
- Apply it to 2.4.4 (possibly earlier versions) with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-label-failure.patch
- ./configure <your-options>
- make
- ...
- make install
- ...
-
-
-
-Index: src/stored/wait.c
-===================================================================
---- src/stored/wait.c  (revision 8605)
-+++ src/stored/wait.c  (working copy)
-@@ -1,7 +1,7 @@
- /*
-    Bacula® - The Network Backup Solution
- 
--   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
-+   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
- 
-    The main author of Bacula is Kern Sibbald, with contributions from
-    many others, a complete list can be found in the file AUTHORS.
-@@ -20,7 +20,7 @@
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
- 
--   Bacula® is a registered trademark of John Walker.
-+   Bacula® is a registered trademark of Kern Sibbald.
-    The licensor of Bacula is the Free Software Foundation Europe
-    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-    Switzerland, email:ftf@fsfeurope.org.
-@@ -62,8 +62,14 @@
- 
-    dev->dlock();  
-    Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked());
-+
-+   /*
-+    * Since we want to mount a tape, make sure current one is
-+    *  not marked as using this drive.
-+    */
-+   volume_unused(dcr);
-+
-    unmounted = is_device_unmounted(dev);
--
-    dev->poll = false;
-    /*
-     * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
-Index: src/stored/reserve.c
-===================================================================
---- src/stored/reserve.c       (revision 8605)
-+++ src/stored/reserve.c       (working copy)
-@@ -20,7 +20,7 @@
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
- 
--   Bacula® is a registered trademark of John Walker.
-+   Bacula® is a registered trademark of Kern Sibbald.
-    The licensor of Bacula is the Free Software Foundation Europe
-    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-    Switzerland, email:ftf@fsfeurope.org.
-@@ -346,8 +346,12 @@
-             goto get_out;
-          }
-          Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name);
--         free_volume(dev);
--         dev->set_unload();             /* have to unload current volume */
-+         /* If old Volume is still mounted, must unload it */
-+         if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) {
-+            Dmsg0(50, "set_unload\n");
-+            dev->set_unload();          /* have to unload current volume */
-+         }
-+         free_volume(dev);              /* Release old volume entry */
-          debug_list_volumes("reserve_vol free");
-       }
-    }
 
+++ /dev/null
-
- This patch fixes bug #1211 crash during reload with bad dird.conf file.
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-reload.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/lib/parse_conf.c
-===================================================================
---- src/lib/parse_conf.c       (revision 8393)
-+++ src/lib/parse_conf.c       (working copy)
-@@ -284,6 +284,7 @@
-             }
-             if (token != T_EQUALS) {
-                scan_err1(lc, _("expected an =, got: %s"), lc->str);
-+               return;
-             }
-             break;
-          }
-@@ -304,6 +305,7 @@
-          Dmsg1(900, "store_msgs dest=%s:\n", NPRT(dest));
-          if (token != T_EQUALS) {
-             scan_err1(lc, _("expected an =, got: %s"), lc->str);
-+            return;
-          }
-          scan_types(lc, (MSGS *)(item->value), item->code, dest, NULL);
-          free_pool_memory(dest);
-@@ -312,7 +314,7 @@
- 
-       default:
-          scan_err1(lc, _("Unknown item code: %d\n"), item->code);
--         break;
-+         return;
-       }
-    }
-    scan_to_eol(lc);
-@@ -352,7 +354,7 @@
-       }
-       if (!found) {
-          scan_err1(lc, _("message type: %s not found"), str);
--         /* NOT REACHED */
-+         return;
-       }
- 
-       if (msg_type == M_MAX+1) {         /* all? */
-@@ -384,12 +386,14 @@
-    lex_get_token(lc, T_NAME);
-    if (!is_name_valid(lc->str, &msg)) {
-       scan_err1(lc, "%s\n", msg);
-+      return;
-    }
-    free_pool_memory(msg);
-    /* Store the name both pass 1 and pass 2 */
-    if (*(item->value)) {
-       scan_err2(lc, _("Attempt to redefine name \"%s\" to \"%s\"."),
-          *(item->value), lc->str);
-+      return;
-    }
-    *(item->value) = bstrdup(lc->str);
-    scan_to_eol(lc);
-@@ -481,10 +485,12 @@
-       if (res == NULL) {
-          scan_err3(lc, _("Could not find config Resource %s referenced on line %d : %s\n"),
-             lc->str, lc->line_no, lc->line);
-+         return;
-       }
-       if (*(item->value)) {
-          scan_err3(lc, _("Attempt to redefine resource \"%s\" referenced on line %d : %s\n"),
-             item->name, lc->line_no, lc->line);
-+         return;
-       }
-       *(item->value) = (char *)res;
-    }
-@@ -520,6 +526,7 @@
-          if (i >= count) {
-             scan_err4(lc, _("Too many %s directives. Max. is %d. line %d: %s\n"),
-                lc->str, count, lc->line_no, lc->line);
-+            return;
-          }
-          list = New(alist(10, not_owned_by_alist));
-       }
-@@ -530,6 +537,7 @@
-          if (res == NULL) {
-             scan_err3(lc, _("Could not find config Resource \"%s\" referenced on line %d : %s\n"),
-                item->name, lc->line_no, lc->line);
-+            return;
-          }
-          Dmsg5(900, "Append %p to alist %p size=%d i=%d %s\n", 
-                res, list, list->size(), i, item->name);
-@@ -592,6 +600,7 @@
-      if (res == NULL) {
-         scan_err3(lc, _("Missing config Resource \"%s\" referenced on line %d : %s\n"),
-            lc->str, lc->line_no, lc->line);
-+        return;
-      }
-    }
-    scan_to_eol(lc);
-@@ -655,12 +664,13 @@
-       }
-       if (!size_to_uint64(bsize, strlen(bsize), &uvalue)) {
-          scan_err1(lc, _("expected a size number, got: %s"), lc->str);
-+         return;
-       }
-       *(uint64_t *)(item->value) = uvalue;
-       break;
-    default:
-       scan_err1(lc, _("expected a size, got: %s"), lc->str);
--      break;
-+      return;
-    }
-    if (token != T_EOL) {
-       scan_to_eol(lc);
-@@ -697,12 +707,13 @@
-       }
-       if (!duration_to_utime(period, &utime)) {
-          scan_err1(lc, _("expected a time period, got: %s"), period);
-+         return;
-       }
-       *(utime_t *)(item->value) = utime;
-       break;
-    default:
-       scan_err1(lc, _("expected a time period, got: %s"), lc->str);
--      break;
-+      return;
-    }
-    if (token != T_EOL) {
-       scan_to_eol(lc);
-@@ -721,6 +732,7 @@
-       *(uint32_t *)(item->value) &= ~(item->code);
-    } else {
-       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
-+      return;
-    }
-    scan_to_eol(lc);
-    set_bit(index, res_all.hdr.item_present);
-@@ -736,6 +748,7 @@
-       *(bool *)(item->value) = false;
-    } else {
-       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
-+      return;
-    }
-    scan_to_eol(lc);
-    set_bit(index, res_all.hdr.item_present);
-@@ -761,6 +774,7 @@
-    }
-    if (i != 0) {
-       scan_err1(lc, _("Expected a Tape Label keyword, got: %s"), lc->str);
-+      return;
-    }
-    scan_to_eol(lc);
-    set_bit(index, res_all.hdr.item_present);
-@@ -910,6 +924,7 @@
-                Dmsg0(900, "T_EOB => define new resource\n");
-                if (res_all.hdr.name == NULL) {
-                   scan_err0(lc, _("Name not specified for resource"));
-+                  return 0;
-                }
-                save_resource(res_type, items, pass);  /* save resource */
-                break;
 
+++ /dev/null
-
- This patch is backported from the development SVN and should fix
- bug #1213, which is a deadlock in the SD when a volume is on the
- wrong drive.
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-sd-deadlock.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/stored/reserve.c
-===================================================================
---- src/stored/reserve.c       (revision 8426)
-+++ src/stored/reserve.c       (working copy)
-@@ -1,7 +1,7 @@
- /*
-    Bacula® - The Network Backup Solution
- 
--   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
-+   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
- 
-    The main author of Bacula is Kern Sibbald, with contributions from
-    many others, a complete list can be found in the file AUTHORS.
-@@ -498,7 +498,6 @@
- void DCR::unreserve_device()
- {
-    lock_volumes();
--   dev->dlock();
-    if (is_reserved()) {
-       clear_reserved();
-       reserved_volume = false;
-@@ -514,7 +513,6 @@
-          volume_unused(this);
-       }
-    }
--   dev->dunlock();
-    unlock_volumes();
- }
- 
-Index: src/stored/acquire.c
-===================================================================
---- src/stored/acquire.c       (revision 8426)
-+++ src/stored/acquire.c       (working copy)
-@@ -1,7 +1,7 @@
- /*
-    Bacula® - The Network Backup Solution
- 
--   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
-+   Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
- 
-    The main author of Bacula is Kern Sibbald, with contributions from
-    many others, a complete list can be found in the file AUTHORS.
-@@ -647,8 +647,8 @@
- 
-    /* Detach this dcr only if attached */
-    if (dcr->attached_to_dev && dev) {
-+      dev->dlock();
-       dcr->unreserve_device();
--      dev->dlock();
-       dcr->dev->attached_dcrs->remove(dcr);  /* detach dcr from device */
-       dcr->attached_to_dev = false;
- //    remove_dcr_from_dcrs(dcr);      /* remove dcr from jcr list */
 
+++ /dev/null
-
- This patch fixes bug #1247 - 64-bit time_t and varargs don't get along in some
- printf-like formatting
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-time_t_64bit.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/stored/spool.c
-===================================================================
---- src/stored/spool.c (revision 8455)
-+++ src/stored/spool.c (working copy)
-@@ -306,7 +306,7 @@
-    set_new_file_parameters(dcr);
- 
-    /* Subtracting run_time give us elapsed time - wait_time since we started despooling */
--   time_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
-+   int32_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
- 
-    if (despool_elapsed <= 0) {
-       despool_elapsed = 1;
-Index: src/stored/append.c
-===================================================================
---- src/stored/append.c        (revision 8455)
-+++ src/stored/append.c        (working copy)
-@@ -270,7 +270,7 @@
-    do_fd_commands(jcr);               /* finish dialog with FD */
- 
- 
--   time_t job_elapsed = time(NULL) - jcr->run_time;
-+   int32_t job_elapsed = time(NULL) - jcr->run_time;
- 
-    if (job_elapsed <= 0) {
-       job_elapsed = 1;
-Index: src/lib/message.c
-===================================================================
---- src/lib/message.c  (revision 8455)
-+++ src/lib/message.c  (working copy)
-@@ -780,8 +780,8 @@
-              case MD_DIRECTOR:
-                 Dmsg1(850, "DIRECTOR for following msg: %s", msg);
-                 if (jcr && jcr->dir_bsock && !jcr->dir_bsock->errors) {
--                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%d %s",
--                      jcr->Job, type, mtime, msg);
-+                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%lld %s",
-+                      jcr->Job, type, (utime_t)mtime, msg);
-                 }
-                 break;
-              case MD_STDOUT:
 
+++ /dev/null
-
- This patch fixes a text sizing problem in the tray-monitor.
- It fixes bug #1219.
-
- Apply it to version 2.4.4 with:
-
- cd <bacula-source>
- patch -p0 <2.4.4-tray-sizing.patch
- ./configure <your options>
- make
- ...
- make install
-
-
-Index: src/tray-monitor/tray-monitor.c
-===================================================================
---- src/tray-monitor/tray-monitor.c    (revision 8393)
-+++ src/tray-monitor/tray-monitor.c    (working copy)
-@@ -1,7 +1,7 @@
- /*
-    Bacula® - The Network Backup Solution
- 
--   Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
-+   Copyright (C) 2004-2009 Free Software Foundation Europe e.V.
- 
-    The main author of Bacula is Kern Sibbald, with contributions from
-    many others, a complete list can be found in the file AUTHORS.
-@@ -97,6 +97,7 @@
- static GtkWidget *textview;
- static GtkTextBuffer *buffer;
- static GtkWidget *timeoutspinner;
-+static GtkWidget *scrolledWindow;
- char** xpm_generic_var;
- static gboolean blinkstate = TRUE;
- 
-@@ -409,9 +410,13 @@
-    }
- 
-    gtk_box_pack_start(GTK_BOX(vbox), daemon_table, FALSE, FALSE, 0);
--
-+  
-    textview = gtk_text_view_new();
- 
-+   scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
-+   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-+   gtk_container_add(GTK_CONTAINER (scrolledWindow), textview);
-+   
-    buffer = gtk_text_buffer_new(NULL);
- 
-    gtk_text_buffer_set_text(buffer, "", -1);
-@@ -456,7 +461,7 @@
- 
-    gtk_text_view_set_buffer(GTK_TEXT_VIEW(textview), buffer);
- 
--   gtk_box_pack_start(GTK_BOX(vbox), textview, TRUE, TRUE, 0);
-+   gtk_box_pack_start(GTK_BOX(vbox), scrolledWindow, TRUE, TRUE, 0);
- 
-    GtkWidget* hbox = gtk_hbox_new(FALSE, 10);
- 
 
--- /dev/null
+
+ This patch fixes bat.pro.in so that bat will install correctly.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-bat-install.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/qt-console/bat.pro.in
+===================================================================
+--- src/qt-console/bat.pro.in  (revision 8326)
++++ src/qt-console/bat.pro.in  (working copy)
+@@ -9,9 +9,9 @@
+ #    
+ CONFIG += qt debug @QWT@
+ 
+-bins.path = /$(DESTDIR)@sbindir@
++bins.path = $(DESTDIR)@sbindir@
+ bins.files = ./bat
+-confs.path = /$(DESTDIR)@sysconfdir@
++confs.path = $(DESTDIR)@sysconfdir@
+ confs.commands = ./install_conf_file   
+ 
+ TEMPLATE     = app
 
--- /dev/null
+
+ This patch fixes bug #1255 'variable %n changed'
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-jobname-edit.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/dird/job.c
+===================================================================
+--- src/dird/job.c     (revision 8455)
++++ src/dird/job.c     (working copy)
+@@ -787,7 +787,7 @@
+    len = strlen(dt) + 5;   /* dt + .%02d EOS */
+    bstrncpy(name, base_name, sizeof(name));
+    name[sizeof(name)-len] = 0;          /* truncate if too long */
+-   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s.%02d", name, dt, seq); /* add date & time */
++   bsnprintf(jcr->Job, sizeof(jcr->Job), "%s.%s_%02d", name, dt, seq); /* add date & time */
+    /* Convert spaces into underscores */
+    for (p=jcr->Job; *p; p++) {
+       if (*p == ' ') {
 
--- /dev/null
+                                                             [label-failure.patch] IQ
+ This patch should fix the problems labeling a tape while
+ Bacula is requesting you to mount or label a new tape.
+ It should also fix problems where Bacula will not recognize
+ that a new tape is inserted or created and it keeps asking for
+ a different tape. It fixes bug #1227.
+
+ Apply it to 2.4.4 (possibly earlier versions) with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-label-failure.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+ ...
+
+
+
+Index: src/stored/wait.c
+===================================================================
+--- src/stored/wait.c  (revision 8605)
++++ src/stored/wait.c  (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+@@ -20,7 +20,7 @@
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+ 
+-   Bacula® is a registered trademark of John Walker.
++   Bacula® is a registered trademark of Kern Sibbald.
+    The licensor of Bacula is the Free Software Foundation Europe
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+@@ -62,8 +62,14 @@
+ 
+    dev->dlock();  
+    Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked());
++
++   /*
++    * Since we want to mount a tape, make sure current one is
++    *  not marked as using this drive.
++    */
++   volume_unused(dcr);
++
+    unmounted = is_device_unmounted(dev);
+-
+    dev->poll = false;
+    /*
+     * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
+Index: src/stored/reserve.c
+===================================================================
+--- src/stored/reserve.c       (revision 8605)
++++ src/stored/reserve.c       (working copy)
+@@ -20,7 +20,7 @@
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+ 
+-   Bacula® is a registered trademark of John Walker.
++   Bacula® is a registered trademark of Kern Sibbald.
+    The licensor of Bacula is the Free Software Foundation Europe
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+@@ -346,8 +346,12 @@
+             goto get_out;
+          }
+          Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name);
+-         free_volume(dev);
+-         dev->set_unload();             /* have to unload current volume */
++         /* If old Volume is still mounted, must unload it */
++         if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) {
++            Dmsg0(50, "set_unload\n");
++            dev->set_unload();          /* have to unload current volume */
++         }
++         free_volume(dev);              /* Release old volume entry */
+          debug_list_volumes("reserve_vol free");
+       }
+    }
 
--- /dev/null
+
+ This patch fixes bug #1211 crash during reload with bad dird.conf file.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-reload.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/lib/parse_conf.c
+===================================================================
+--- src/lib/parse_conf.c       (revision 8393)
++++ src/lib/parse_conf.c       (working copy)
+@@ -284,6 +284,7 @@
+             }
+             if (token != T_EQUALS) {
+                scan_err1(lc, _("expected an =, got: %s"), lc->str);
++               return;
+             }
+             break;
+          }
+@@ -304,6 +305,7 @@
+          Dmsg1(900, "store_msgs dest=%s:\n", NPRT(dest));
+          if (token != T_EQUALS) {
+             scan_err1(lc, _("expected an =, got: %s"), lc->str);
++            return;
+          }
+          scan_types(lc, (MSGS *)(item->value), item->code, dest, NULL);
+          free_pool_memory(dest);
+@@ -312,7 +314,7 @@
+ 
+       default:
+          scan_err1(lc, _("Unknown item code: %d\n"), item->code);
+-         break;
++         return;
+       }
+    }
+    scan_to_eol(lc);
+@@ -352,7 +354,7 @@
+       }
+       if (!found) {
+          scan_err1(lc, _("message type: %s not found"), str);
+-         /* NOT REACHED */
++         return;
+       }
+ 
+       if (msg_type == M_MAX+1) {         /* all? */
+@@ -384,12 +386,14 @@
+    lex_get_token(lc, T_NAME);
+    if (!is_name_valid(lc->str, &msg)) {
+       scan_err1(lc, "%s\n", msg);
++      return;
+    }
+    free_pool_memory(msg);
+    /* Store the name both pass 1 and pass 2 */
+    if (*(item->value)) {
+       scan_err2(lc, _("Attempt to redefine name \"%s\" to \"%s\"."),
+          *(item->value), lc->str);
++      return;
+    }
+    *(item->value) = bstrdup(lc->str);
+    scan_to_eol(lc);
+@@ -481,10 +485,12 @@
+       if (res == NULL) {
+          scan_err3(lc, _("Could not find config Resource %s referenced on line %d : %s\n"),
+             lc->str, lc->line_no, lc->line);
++         return;
+       }
+       if (*(item->value)) {
+          scan_err3(lc, _("Attempt to redefine resource \"%s\" referenced on line %d : %s\n"),
+             item->name, lc->line_no, lc->line);
++         return;
+       }
+       *(item->value) = (char *)res;
+    }
+@@ -520,6 +526,7 @@
+          if (i >= count) {
+             scan_err4(lc, _("Too many %s directives. Max. is %d. line %d: %s\n"),
+                lc->str, count, lc->line_no, lc->line);
++            return;
+          }
+          list = New(alist(10, not_owned_by_alist));
+       }
+@@ -530,6 +537,7 @@
+          if (res == NULL) {
+             scan_err3(lc, _("Could not find config Resource \"%s\" referenced on line %d : %s\n"),
+                item->name, lc->line_no, lc->line);
++            return;
+          }
+          Dmsg5(900, "Append %p to alist %p size=%d i=%d %s\n", 
+                res, list, list->size(), i, item->name);
+@@ -592,6 +600,7 @@
+      if (res == NULL) {
+         scan_err3(lc, _("Missing config Resource \"%s\" referenced on line %d : %s\n"),
+            lc->str, lc->line_no, lc->line);
++        return;
+      }
+    }
+    scan_to_eol(lc);
+@@ -655,12 +664,13 @@
+       }
+       if (!size_to_uint64(bsize, strlen(bsize), &uvalue)) {
+          scan_err1(lc, _("expected a size number, got: %s"), lc->str);
++         return;
+       }
+       *(uint64_t *)(item->value) = uvalue;
+       break;
+    default:
+       scan_err1(lc, _("expected a size, got: %s"), lc->str);
+-      break;
++      return;
+    }
+    if (token != T_EOL) {
+       scan_to_eol(lc);
+@@ -697,12 +707,13 @@
+       }
+       if (!duration_to_utime(period, &utime)) {
+          scan_err1(lc, _("expected a time period, got: %s"), period);
++         return;
+       }
+       *(utime_t *)(item->value) = utime;
+       break;
+    default:
+       scan_err1(lc, _("expected a time period, got: %s"), lc->str);
+-      break;
++      return;
+    }
+    if (token != T_EOL) {
+       scan_to_eol(lc);
+@@ -721,6 +732,7 @@
+       *(uint32_t *)(item->value) &= ~(item->code);
+    } else {
+       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -736,6 +748,7 @@
+       *(bool *)(item->value) = false;
+    } else {
+       scan_err2(lc, _("Expect %s, got: %s"), "YES, NO, TRUE, or FALSE", lc->str); /* YES and NO must not be translated */
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -761,6 +774,7 @@
+    }
+    if (i != 0) {
+       scan_err1(lc, _("Expected a Tape Label keyword, got: %s"), lc->str);
++      return;
+    }
+    scan_to_eol(lc);
+    set_bit(index, res_all.hdr.item_present);
+@@ -910,6 +924,7 @@
+                Dmsg0(900, "T_EOB => define new resource\n");
+                if (res_all.hdr.name == NULL) {
+                   scan_err0(lc, _("Name not specified for resource"));
++                  return 0;
+                }
+                save_resource(res_type, items, pass);  /* save resource */
+                break;
 
--- /dev/null
+
+ This patch is backported from the development SVN and should fix
+ bug #1213, which is a deadlock in the SD when a volume is on the
+ wrong drive.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-sd-deadlock.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/reserve.c
+===================================================================
+--- src/stored/reserve.c       (revision 8426)
++++ src/stored/reserve.c       (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+@@ -498,7 +498,6 @@
+ void DCR::unreserve_device()
+ {
+    lock_volumes();
+-   dev->dlock();
+    if (is_reserved()) {
+       clear_reserved();
+       reserved_volume = false;
+@@ -514,7 +513,6 @@
+          volume_unused(this);
+       }
+    }
+-   dev->dunlock();
+    unlock_volumes();
+ }
+ 
+Index: src/stored/acquire.c
+===================================================================
+--- src/stored/acquire.c       (revision 8426)
++++ src/stored/acquire.c       (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+@@ -647,8 +647,8 @@
+ 
+    /* Detach this dcr only if attached */
+    if (dcr->attached_to_dev && dev) {
++      dev->dlock();
+       dcr->unreserve_device();
+-      dev->dlock();
+       dcr->dev->attached_dcrs->remove(dcr);  /* detach dcr from device */
+       dcr->attached_to_dev = false;
+ //    remove_dcr_from_dcrs(dcr);      /* remove dcr from jcr list */
 
--- /dev/null
+
+ This patch fixes bug #1247 - 64-bit time_t and varargs don't get along in some
+ printf-like formatting
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-time_t_64bit.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/spool.c
+===================================================================
+--- src/stored/spool.c (revision 8455)
++++ src/stored/spool.c (working copy)
+@@ -306,7 +306,7 @@
+    set_new_file_parameters(dcr);
+ 
+    /* Subtracting run_time give us elapsed time - wait_time since we started despooling */
+-   time_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
++   int32_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
+ 
+    if (despool_elapsed <= 0) {
+       despool_elapsed = 1;
+Index: src/stored/append.c
+===================================================================
+--- src/stored/append.c        (revision 8455)
++++ src/stored/append.c        (working copy)
+@@ -270,7 +270,7 @@
+    do_fd_commands(jcr);               /* finish dialog with FD */
+ 
+ 
+-   time_t job_elapsed = time(NULL) - jcr->run_time;
++   int32_t job_elapsed = time(NULL) - jcr->run_time;
+ 
+    if (job_elapsed <= 0) {
+       job_elapsed = 1;
+Index: src/lib/message.c
+===================================================================
+--- src/lib/message.c  (revision 8455)
++++ src/lib/message.c  (working copy)
+@@ -780,8 +780,8 @@
+              case MD_DIRECTOR:
+                 Dmsg1(850, "DIRECTOR for following msg: %s", msg);
+                 if (jcr && jcr->dir_bsock && !jcr->dir_bsock->errors) {
+-                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%d %s",
+-                      jcr->Job, type, mtime, msg);
++                   bnet_fsend(jcr->dir_bsock, "Jmsg Job=%s type=%d level=%lld %s",
++                      jcr->Job, type, (utime_t)mtime, msg);
+                 }
+                 break;
+              case MD_STDOUT:
 
--- /dev/null
+
+ This patch fixes a text sizing problem in the tray-monitor.
+ It fixes bug #1219.
+
+ Apply it to version 2.4.4 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.4-tray-sizing.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/tray-monitor/tray-monitor.c
+===================================================================
+--- src/tray-monitor/tray-monitor.c    (revision 8393)
++++ src/tray-monitor/tray-monitor.c    (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
++   Copyright (C) 2004-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+@@ -97,6 +97,7 @@
+ static GtkWidget *textview;
+ static GtkTextBuffer *buffer;
+ static GtkWidget *timeoutspinner;
++static GtkWidget *scrolledWindow;
+ char** xpm_generic_var;
+ static gboolean blinkstate = TRUE;
+ 
+@@ -409,9 +410,13 @@
+    }
+ 
+    gtk_box_pack_start(GTK_BOX(vbox), daemon_table, FALSE, FALSE, 0);
+-
++  
+    textview = gtk_text_view_new();
+ 
++   scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
++   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
++   gtk_container_add(GTK_CONTAINER (scrolledWindow), textview);
++   
+    buffer = gtk_text_buffer_new(NULL);
+ 
+    gtk_text_buffer_set_text(buffer, "", -1);
+@@ -456,7 +461,7 @@
+ 
+    gtk_text_view_set_buffer(GTK_TEXT_VIEW(textview), buffer);
+ 
+-   gtk_box_pack_start(GTK_BOX(vbox), textview, TRUE, TRUE, 0);
++   gtk_box_pack_start(GTK_BOX(vbox), scrolledWindow, TRUE, TRUE, 0);
+ 
+    GtkWidget* hbox = gtk_hbox_new(FALSE, 10);
+ 
 
--- /dev/null
+
+ This patch can be applied to version 3.0.0. It ensures that the list
+ of volumes to be read is created very early when starting the Job in
+ the SD (before the drive reservation) so that any Volume to be read
+ cannot also be chosen to append.
+
+ Apply it to version 3.0.0 with:
+
+ cd <bacula-source>
+ patch -p0 <3.0.0-read-vol-list.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+
+Index: src/dird/msgchan.c
+===================================================================
+--- src/dird/msgchan.c (revision 8699)
++++ src/dird/msgchan.c (working copy)
+@@ -144,10 +144,12 @@
+ }
+ #endif
+ 
++static char OKbootstrap[] = "3000 OK bootstrap\n";
++
+ /*
+  * Start a job with the Storage daemon
+  */
+-bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore)
++bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, bool send_bsr)
+ {
+    bool ok = true;
+    STORE *storage;
+@@ -196,7 +198,7 @@
+                   &jcr->VolSessionTime, &auth_key) != 3) {
+           Dmsg1(100, "BadJob=%s\n", sd->msg);
+           Jmsg(jcr, M_FATAL, 0, _("Storage daemon rejected Job command: %s\n"), sd->msg);
+-          return 0;
++          return false;
+        } else {
+           jcr->sd_auth_key = bstrdup(auth_key);
+           Dmsg1(150, "sd_auth_key=%s\n", jcr->sd_auth_key);
+@@ -204,9 +206,14 @@
+    } else {
+       Jmsg(jcr, M_FATAL, 0, _("<stored: bad response to Job command: %s\n"),
+          sd->bstrerror());
+-      return 0;
++      return false;
+    }
+ 
++   if (send_bsr && (!send_bootstrap_file(jcr, sd) ||
++       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR))) {
++      return false;
++   }
++
+    /*
+     * We have two loops here. The first comes from the 
+     *  Storage = associated with the Job, and we need 
+Index: src/dird/migrate.c
+===================================================================
+--- src/dird/migrate.c (revision 8699)
++++ src/dird/migrate.c (working copy)
+@@ -55,7 +55,6 @@
+ 
+ static const int dbglevel = 10;
+ 
+-static char OKbootstrap[] = "3000 OK bootstrap\n";
+ static int get_job_to_migrate(JCR *jcr);
+ struct idpkt;
+ static bool regex_find_jobids(JCR *jcr, idpkt *ids, const char *query1,
+@@ -353,15 +352,11 @@
+            ((STORE *)jcr->rstorage->first())->name());
+       return false;
+    }
+-   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) {
++   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) {
+       return false;
+    }
+    Dmsg0(150, "Storage daemon connection OK\n");
+ 
+-   if (!send_bootstrap_file(jcr, sd) ||
+-       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
+-      return false;
+-   }
+ 
+    /*    
+     * We re-update the job start record so that the start
+Index: src/dird/protos.h
+===================================================================
+--- src/dird/protos.h  (revision 8699)
++++ src/dird/protos.h  (working copy)
+@@ -155,7 +155,8 @@
+ /* msgchan.c */
+ extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval,
+                               int max_retry_time, int verbose);
+-extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore);
++extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore,
++              bool send_bsr=false);
+ extern bool start_storage_daemon_message_thread(JCR *jcr);
+ extern int bget_dirmsg(BSOCK *bs);
+ extern void wait_for_storage_daemon_termination(JCR *jcr);
+Index: src/dird/vbackup.c
+===================================================================
+--- src/dird/vbackup.c (revision 8699)
++++ src/dird/vbackup.c (working copy)
+@@ -50,8 +50,6 @@
+ 
+ static const int dbglevel = 10;
+ 
+-static char OKbootstrap[] = "3000 OK bootstrap\n";
+-
+ static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids);
+ void vbackup_cleanup(JCR *jcr, int TermCode);
+ 
+@@ -217,16 +215,11 @@
+    /*
+     * Now start a job with the Storage daemon
+     */
+-   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) {
++   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) {
+       return false;
+    }
+    Dmsg0(100, "Storage daemon connection OK\n");
+ 
+-   if (!send_bootstrap_file(jcr, sd) ||
+-       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
+-      return false;
+-   }
+-
+    /*    
+     * We re-update the job start record so that the start
+     *  time is set after the run before job.  This avoids 
+Index: src/stored/fd_cmds.c
+===================================================================
+--- src/stored/fd_cmds.c       (revision 8699)
++++ src/stored/fd_cmds.c       (working copy)
+@@ -388,6 +388,8 @@
+    if (debug_level >= 10) {
+       dump_bsr(jcr->bsr, true);
+    }
++   /* If we got a bootstrap, we are reading, so create read volume list */
++   create_restore_volume_list(jcr);
+    ok = true;
+ 
+ bail_out:
+Index: src/stored/read.c
+===================================================================
+--- src/stored/read.c  (revision 8699)
++++ src/stored/read.c  (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+@@ -62,11 +62,8 @@
+       return false;
+    }
+ 
+-
+-   create_restore_volume_list(jcr);
+    if (jcr->NumReadVolumes == 0) {
+       Jmsg(jcr, M_FATAL, 0, _("No Volume names found for restore.\n"));
+-      free_restore_volume_list(jcr);
+       fd->fsend(FD_error);
+       return false;
+    }
+@@ -76,7 +73,6 @@
+ 
+    /* Ready device for reading */
+    if (!acquire_device_for_read(dcr)) {
+-      free_restore_volume_list(jcr);
+       fd->fsend(FD_error);
+       return false;
+    }
+@@ -92,7 +88,6 @@
+       ok = false;
+    }
+ 
+-   free_restore_volume_list(jcr);
+    Dmsg0(30, "Done reading.\n");
+    return ok;
+ }
+Index: src/stored/parse_bsr.c
+===================================================================
+--- src/stored/parse_bsr.c     (revision 8699)
++++ src/stored/parse_bsr.c     (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+ 
+-   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
++   Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
+ 
+    The main author of Bacula is Kern Sibbald, with contributions from
+    many others, a complete list can be found in the file AUTHORS.
+Index: src/stored/mac.c
+===================================================================
+--- src/stored/mac.c   (revision 8699)
++++ src/stored/mac.c   (working copy)
+@@ -84,8 +84,6 @@
+    }
+    Dmsg2(100, "read_dcr=%p write_dcr=%p\n", jcr->read_dcr, jcr->dcr);
+ 
+-
+-   create_restore_volume_list(jcr);
+    if (jcr->NumReadVolumes == 0) {
+       Jmsg(jcr, M_FATAL, 0, _("No Volume names found for %s.\n"), Type);
+       goto bail_out;
+@@ -161,11 +159,8 @@
+       }
+    }
+ 
+-   free_restore_volume_list(jcr);
+-
+    dir_send_job_status(jcr);          /* update director */
+ 
+-
+    Dmsg0(30, "Done reading.\n");
+    jcr->end_time = time(NULL);
+    dequeue_messages(jcr);             /* send any queued messages */
+Index: src/stored/vol_mgr.c
+===================================================================
+--- src/stored/vol_mgr.c       (revision 8699)
++++ src/stored/vol_mgr.c       (working copy)
+@@ -529,6 +529,7 @@
+    VOLRES vol, *fvol;
+ 
+    if (read_vol_list->empty()) {
++      Dmsg0(dbglvl, "find_read_vol: read_vol_list empty.\n");
+       return NULL;
+    }
+    /* Do not lock reservations here */
+Index: src/stored/job.c
+===================================================================
+--- src/stored/job.c   (revision 8699)
++++ src/stored/job.c   (working copy)
+@@ -371,6 +371,8 @@
+       free_bsr(jcr->bsr);
+       jcr->bsr = NULL;
+    }
++   /* Free any restore volume list created */
++   free_restore_volume_list(jcr);
+    if (jcr->RestoreBootstrap) {
+       unlink(jcr->RestoreBootstrap);
+       free_pool_memory(jcr->RestoreBootstrap);
+Index: src/stored/acquire.c
+===================================================================
+--- src/stored/acquire.c       (revision 8699)
++++ src/stored/acquire.c       (working copy)
+@@ -187,7 +187,7 @@
+    if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) {
+       Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", 
+          dcr->VolumeName, jcr->errmsg);
+-      Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
++      Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
+    }
+    dev->set_load();                /* set to load volume */
+    
+@@ -241,7 +241,7 @@
+           *  error messages when nothing is mounted.
+           */
+          if (tape_previously_mounted) {
+-            Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
++            Jmsg(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
+          }
+          goto default_path;
+       case VOL_NAME_ERROR:
+@@ -257,7 +257,7 @@
+          dev->set_load();
+          /* Fall through */
+       default:
+-         Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
++         Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
+ default_path:
+          Dmsg0(50, "default path\n");
+          tape_previously_mounted = true;
 
 
 static const int dbglevel = 10;
 
-static char OKbootstrap[] = "3000 OK bootstrap\n";
 static int get_job_to_migrate(JCR *jcr);
 struct idpkt;
 static bool regex_find_jobids(JCR *jcr, idpkt *ids, const char *query1,
            ((STORE *)jcr->rstorage->first())->name());
       return false;
    }
-   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) {
+   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) {
       return false;
    }
    Dmsg0(150, "Storage daemon connection OK\n");
 
-   if (!send_bootstrap_file(jcr, sd) ||
-       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
-      return false;
-   }
 
    /*    
     * We re-update the job start record so that the start
 
 }
 #endif
 
+static char OKbootstrap[] = "3000 OK bootstrap\n";
+
 /*
  * Start a job with the Storage daemon
  */
-bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore)
+bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, bool send_bsr)
 {
    bool ok = true;
    STORE *storage;
                   &jcr->VolSessionTime, &auth_key) != 3) {
           Dmsg1(100, "BadJob=%s\n", sd->msg);
           Jmsg(jcr, M_FATAL, 0, _("Storage daemon rejected Job command: %s\n"), sd->msg);
-          return 0;
+          return false;
        } else {
           jcr->sd_auth_key = bstrdup(auth_key);
           Dmsg1(150, "sd_auth_key=%s\n", jcr->sd_auth_key);
    } else {
       Jmsg(jcr, M_FATAL, 0, _("<stored: bad response to Job command: %s\n"),
          sd->bstrerror());
-      return 0;
+      return false;
+   }
+
+   if (send_bsr && (!send_bootstrap_file(jcr, sd) ||
+       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR))) {
+      return false;
    }
 
    /*
 
 /* msgchan.c */
 extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval,
                               int max_retry_time, int verbose);
-extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore);
+extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore,
+              bool send_bsr=false);
 extern bool start_storage_daemon_message_thread(JCR *jcr);
 extern int bget_dirmsg(BSOCK *bs);
 extern void wait_for_storage_daemon_termination(JCR *jcr);
 
 
 static const int dbglevel = 10;
 
-static char OKbootstrap[] = "3000 OK bootstrap\n";
-
 static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids);
 void vbackup_cleanup(JCR *jcr, int TermCode);
 
    /*
     * Now start a job with the Storage daemon
     */
-   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) {
+   if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) {
       return false;
    }
    Dmsg0(100, "Storage daemon connection OK\n");
 
-   if (!send_bootstrap_file(jcr, sd) ||
-       !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
-      return false;
-   }
-
    /*    
     * We re-update the job start record so that the start
     *  time is set after the run before job.  This avoids 
 
    if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) {
       Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", 
          dcr->VolumeName, jcr->errmsg);
-      Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+      Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
    }
    dev->set_load();                /* set to load volume */
    
           *  error messages when nothing is mounted.
           */
          if (tape_previously_mounted) {
-            Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+            Jmsg(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
          }
          goto default_path;
       case VOL_NAME_ERROR:
          dev->set_load();
          /* Fall through */
       default:
-         Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+         Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg);
 default_path:
          Dmsg0(50, "default path\n");
          tape_previously_mounted = true;
 
    if (debug_level >= 10) {
       dump_bsr(jcr->bsr, true);
    }
+   /* If we got a bootstrap, we are reading, so create read volume list */
+   create_restore_volume_list(jcr);
    ok = true;
 
 bail_out:
 
       free_bsr(jcr->bsr);
       jcr->bsr = NULL;
    }
+   /* Free any restore volume list created */
+   free_restore_volume_list(jcr);
    if (jcr->RestoreBootstrap) {
       unlink(jcr->RestoreBootstrap);
       free_pool_memory(jcr->RestoreBootstrap);
 
    }
    Dmsg2(100, "read_dcr=%p write_dcr=%p\n", jcr->read_dcr, jcr->dcr);
 
-
-   create_restore_volume_list(jcr);
    if (jcr->NumReadVolumes == 0) {
       Jmsg(jcr, M_FATAL, 0, _("No Volume names found for %s.\n"), Type);
       goto bail_out;
       }
    }
 
-   free_restore_volume_list(jcr);
-
    dir_send_job_status(jcr);          /* update director */
 
-
    Dmsg0(30, "Done reading.\n");
    jcr->end_time = time(NULL);
    dequeue_messages(jcr);             /* send any queued messages */
 
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
 
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
       return false;
    }
 
-
-   create_restore_volume_list(jcr);
    if (jcr->NumReadVolumes == 0) {
       Jmsg(jcr, M_FATAL, 0, _("No Volume names found for restore.\n"));
-      free_restore_volume_list(jcr);
       fd->fsend(FD_error);
       return false;
    }
 
    /* Ready device for reading */
    if (!acquire_device_for_read(dcr)) {
-      free_restore_volume_list(jcr);
       fd->fsend(FD_error);
       return false;
    }
       ok = false;
    }
 
-   free_restore_volume_list(jcr);
    Dmsg0(30, "Done reading.\n");
    return ok;
 }
 
    VOLRES vol, *fvol;
 
    if (read_vol_list->empty()) {
+      Dmsg0(dbglvl, "find_read_vol: read_vol_list empty.\n");
       return NULL;
    }
    /* Do not lock reservations here */
 
 
 #undef  VERSION
 #define VERSION "3.0.0"
-#define BDATE   "06 April 2009"
-#define LSMDATE "06Apr09"
+#define BDATE   "11 April 2009"
+#define LSMDATE "11Apr09"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2009"       /* year for copyright messages in progs */
 
           
 General:
 
+11Apr09
+kes  Modify insertion of read Volumes in SD to be done before the
+     drive reservation. This ensures that a Volume to be read will not
+     be reserved for writing.
+
+Release Version 3.0.0
 06Apr09
 kes  Change default plugins dir to /usr/lib.
 05Apr09