2
This patch should fix the bug #1175 about Slot field
3
that is not reset after update slots.
4
Should work for 2.4.3 with 2.4.3-update-slots.patch
7
patch -p0 <2.4.3-unique-inchanger.patch
8
./configure <your-options>
13
Index: src/cats/sql_update.c
14
===================================================================
15
--- src/cats/sql_update.c (révision 8063)
16
+++ src/cats/sql_update.c (copie de travail)
18
if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0) {
20
if (mr->MediaId != 0) {
21
- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
22
+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
23
"Slot=%d AND StorageId=%s AND MediaId!=%s",
25
edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2));
27
} else if (mr->VolumeName[0]) { /* We have a volume name */
28
- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
29
+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
30
"Slot=%d AND StorageId=%s AND VolumeName!='%s'",
32
edit_int64(mr->StorageId, ed1), mr->VolumeName);
34
} else { /* used by ua_label to reset all volume with this slot */
35
- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
36
+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0, Slot=0 WHERE "
37
"Slot=%d AND StorageId=%s",
39
edit_int64(mr->StorageId, ed1), mr->VolumeName);