--- /dev/null
+Index: src/stored/block.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/block.c,v
+retrieving revision 1.116.2.3
+diff -u -u -b -r1.116.2.3 block.c
+--- src/stored/block.c 24 Mar 2006 16:35:23 -0000 1.116.2.3
++++ src/stored/block.c 12 Jun 2006 16:19:27 -0000
+@@ -9,7 +9,7 @@
+ *
+ */
+ /*
+- Copyright (C) 2001-2005 Kern Sibbald
++ Copyright (C) 2001-2006 Kern Sibbald
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+@@ -910,13 +910,12 @@
+ Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0),
+ ((dev->file_addr-dev->part_start) == dev->part_size),
+ (dev->part <= dev->VolCatInfo.VolCatParts));*/
+- /* Check for part file end */
+- if ((dev->num_parts > 0) &&
+- ((dev->file_addr-dev->part_start) == dev->part_size) &&
+- (dev->part < dev->num_parts)) {
++ /* Check for DVD part file end */
++ if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
++ dev->part < dev->num_parts) {
+ if (dvd_open_next_part(dcr) < 0) {
+- Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
+- dev->print_name(), strerror_dev(dev));
++ Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
++ dev->part, dev->print_name(), strerror_dev(dev));
+ dev->dev_errno = EIO;
+ return false;
+ }
--- /dev/null
+
+ This patch should correct the FreeBSD mutex crash that happens in
+ the Director after a sudden clock shift or after the "reload" command.
+ Apply it to 1.38.10 (will not work with prior version) with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.10-scheduler.patch
+ make
+ make install
+ ...
+
+
+
+Index: src/dird/scheduler.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/scheduler.c,v
+retrieving revision 1.33.2.2
+diff -u -r1.33.2.2 scheduler.c
+--- src/dird/scheduler.c 4 Jun 2006 12:24:39 -0000 1.33.2.2
++++ src/dird/scheduler.c 24 Jun 2006 17:25:58 -0000
+@@ -151,6 +151,7 @@
+ free(next_job);
+ }
+ schedules_invalidated = false;
++ unlock_jobs();
+ goto again;
+ }
+ unlock_jobs();