--- /dev/null
+
+ 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 <bacula-source>
+ patch -p0 <1175-unique-inchanger.patch
+ ./configure <your-options>
+ 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);