From: Kern Sibbald Date: Sun, 19 Dec 2010 08:36:30 +0000 (+0100) Subject: Set proper status of autochanger slots with 0 on startup -- no volume rather than... X-Git-Tag: Release-7.0.0~1259 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be9b109bb626803e357777d09a1e2d8d8a3122ef;p=bacula%2Fbacula Set proper status of autochanger slots with 0 on startup -- no volume rather than unknown --- diff --git a/bacula/src/stored/autochanger.c b/bacula/src/stored/autochanger.c index f3438f326d..b01f4cfd52 100644 --- a/bacula/src/stored/autochanger.c +++ b/bacula/src/stored/autochanger.c @@ -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;