git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6843
91ce42f0-d328-0410-95d8-
f526ca767f89
} else {
bstrncpy(dev->BadVolName, dev->VolHdr.VolumeName, sizeof(dev->BadVolName));
}
} else {
bstrncpy(dev->BadVolName, dev->VolHdr.VolumeName, sizeof(dev->BadVolName));
}
- unload_autochanger(dcr, -1);
+ if (!unload_autochanger(dcr, -1)) {
+ /* at least free the device so we can re-open with correct volume */
+ dev->close();
+ }
/* Fall through */
default:
Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
/* Fall through */
default:
Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
try_autochanger = false;
continue; /* try reading volume mounted */
}
try_autochanger = false;
continue; /* try reading volume mounted */
}
+ /* Try closing and re-opening */
+ dev->close();
+ dev->clear_unload();
+ if (dev->open(dcr, OPEN_READ_ONLY) >= 0) {
+ continue;
+ }
}
/* Mount a specific volume and no other */
}
/* Mount a specific volume and no other */
{
Jmsg(jcr, M_INFO, 0, _("Marking Volume \"%s\" in Error in Catalog.\n"),
VolumeName);
{
Jmsg(jcr, M_INFO, 0, _("Marking Volume \"%s\" in Error in Catalog.\n"),
VolumeName);
- dev->VolCatInfo = VolCatInfo; /* structure assignment */
+ dev->VolCatInfo = VolCatInfo; /* structure assignment */
bstrncpy(dev->VolCatInfo.VolCatStatus, "Error", sizeof(dev->VolCatInfo.VolCatStatus));
Dmsg0(150, "dir_update_vol_info. Set Error.\n");
dir_update_volume_info(this, false, false);
volume_unused(this);
bstrncpy(dev->VolCatInfo.VolCatStatus, "Error", sizeof(dev->VolCatInfo.VolCatStatus));
Dmsg0(150, "dir_update_vol_info. Set Error.\n");
dir_update_volume_info(this, false, false);
volume_unused(this);
+ dev->set_unload(); /* must get a new volume */
if (dev->is_open()) {
dev->offline_or_rewind();
}
if (dev->is_open()) {
dev->offline_or_rewind();
}
Dmsg0(190, "release_volume\n");
}
Dmsg0(190, "release_volume\n");
}
#undef VERSION
#define VERSION "2.3.18"
#undef VERSION
#define VERSION "2.3.18"
-#define BDATE "16 April 2008"
-#define LSMDATE "16Apr08"
+#define BDATE "19 April 2008"
+#define LSMDATE "19Apr08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
+19Apr08
+kes Force unload of volume when wrong volume mounted in SD.
17Apr08
kes Fix bat seg fault at termination.
kes Add Bacula generated version to bat about box.
17Apr08
kes Fix bat seg fault at termination.
kes Add Bacula generated version to bat about box.