From 711ea0e4c7d77474691de4ead7af9306ea3cbda1 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 7 Nov 2008 12:58:31 +0000 Subject: [PATCH] ebl Add a patch for #1175 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8005 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../testing/1175-unique-inchanger.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 bacula/patches/testing/1175-unique-inchanger.patch diff --git a/bacula/patches/testing/1175-unique-inchanger.patch b/bacula/patches/testing/1175-unique-inchanger.patch new file mode 100644 index 0000000000..5ed55280d8 --- /dev/null +++ b/bacula/patches/testing/1175-unique-inchanger.patch @@ -0,0 +1,39 @@ + + This patch should fix the bug #1175 about Slot field + that is not reset after update slots. + Should work for 2.4.3 with 2.4.3-update-slots.patch + + cd + patch -p0 <1175-unique-inchanger.patch + ./configure + make + ... + make install + +Index: src/cats/sql_update.c +=================================================================== +--- src/cats/sql_update.c (révision 7981) ++++ src/cats/sql_update.c (copie de travail) +@@ -476,19 +476,19 @@ + if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0) { + + if (mr->MediaId != 0) { +- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE " ++ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE " + "Slot=%d AND StorageId=%s AND MediaId!=%s", + mr->Slot, + edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2)); + + } else if (*mr->VolumeName) { +- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE " ++ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE " + "Slot=%d AND StorageId=%s AND VolumeName!='%s'", + mr->Slot, + edit_int64(mr->StorageId, ed1), mr->VolumeName); + + } else { /* used by ua_label to reset all volume with this slot */ +- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE " ++ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE " + "Slot=%d AND StorageId=%s", + mr->Slot, + edit_int64(mr->StorageId, ed1), mr->VolumeName); -- 2.39.5