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/?a=commitdiff_plain;h=b6008d7833f305ed4de0811d616dbbd1c2126708;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;