]> git.sur5r.net Git - bacula/bacula/commitdiff
Set proper status of autochanger slots with 0 on startup -- no volume rather than...
authorKern Sibbald <kern@sibbald.com>
Sun, 19 Dec 2010 08:36:30 +0000 (09:36 +0100)
committerKern Sibbald <kern@sibbald.com>
Sun, 19 Dec 2010 08:38:14 +0000 (09:38 +0100)
bacula/src/stored/autochanger.c

index f3438f326dab01f066cb1ab66de27a1d0419259b..b01f4cfd529f244acd035241261e9b740ce0d373 100644 (file)
@@ -299,7 +299,11 @@ int get_autochanger_loaded_slot(DCR *dcr)
             Jmsg(jcr, M_INFO, 0, _("3302 Autochanger \"loaded? drive %d\", result: nothing loaded.\n"),
                  drive);
          }
-         dev->clear_slot();   /* unknown */
+         if (loaded == 0) {      /* no slot loaded */
+            dev->set_slot(0);
+         } else {                /* probably some error */
+            dev->clear_slot();   /* unknown */
+         }
       }
    } else {
       berrno be;