From: Eric Bollengier Date: Fri, 7 Nov 2008 12:58:31 +0000 (+0000) Subject: ebl Add a patch for #1175 X-Git-Tag: Release-3.0.0~618 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c3a50c4b3729dc48eb9c9c0fa09cc39683e58c7;p=bacula%2Fbacula ebl Add a patch for #1175 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8005 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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);