From 48db0a70e368157774533366dfb7dd4bdaf96353 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 19 Dec 2010 09:36:30 +0100 Subject: [PATCH] Set proper status of autochanger slots with 0 on startup -- no volume rather than unknown --- bacula/src/stored/autochanger.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5