unload_dev(dcr, swap_dev);
swap_dev = NULL;
dev->vol->clear_swapping();
+ dev->VolHdr.VolumeName[0] = 0; /* don't yet have right Volume */
}
if (!is_suitable_volume_mounted()) {
+ bool have_vol = false;
+ /* Do we have a candidate volume? */
+ if (dev->vol) {
+ bstrncpy(VolumeName, dev->vol->vol_name, sizeof(VolumeName));
+ have_vol = dir_get_volume_info(this, GET_VOL_INFO_FOR_WRITE);
+ }
/*
* Get Director's idea of what tape we should have mounted.
* in dcr->VolCatInfo
*/
- Dmsg0(200, "Before dir_find_next_appendable_volume.\n");
- while (!dir_find_next_appendable_volume(dcr)) {
- Dmsg0(200, "not dir_find_next\n");
- if (!dir_ask_sysop_to_create_appendable_volume(dcr)) {
- goto bail_out;
- }
- Dmsg0(200, "Again dir_find_next_append...\n");
+ if (!have_vol) {
+ Dmsg0(200, "Before dir_find_next_appendable_volume.\n");
+ while (!dir_find_next_appendable_volume(dcr)) {
+ Dmsg0(200, "not dir_find_next\n");
+ if (job_canceled(jcr) || !dir_ask_sysop_to_create_appendable_volume(dcr)) {
+ goto bail_out;
+ }
+ Dmsg0(200, "Again dir_find_next_append...\n");
+ }
}
}
if (job_canceled(jcr)) {
#undef VERSION
#define VERSION "2.3.18"
-#define BDATE "10 April 2008"
-#define LSMDATE "10Apr08"
+#define BDATE "11 April 2008"
+#define LSMDATE "11Apr08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */