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-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=48db0a70e368157774533366dfb7dd4bdaf96353 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;