+/*
+ Copyright (C) 2000-2006 Kern Sibbald
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
+ */
/*
* Version $Id$
*/
void
on_run_ok_clicked(GtkButton *button, gpointer user_data)
{
- char *job, *fileset, *level, *client, *pool, *when, *where, *storage;
-
+ char *job, *fileset, *level, *client, *pool, *when, *where, *storage, *priority;
+
gtk_widget_hide(run_dialog);
gtk_main_quit();
pool = get_combo_text(run_dialog, "combo_pool");
storage = get_combo_text(run_dialog, "combo_storage");
level = get_combo_text(run_dialog, "combo_level");
-
+ priority = get_spin_text(run_dialog, "spinbutton1");
when = get_entry_text(run_dialog, "entry_when");
where = get_entry_text(run_dialog, "entry_where");
if (!job || !fileset || !client || !pool || !storage ||
- !level || !when || !where) {
+ !level || !priority || !when || !where) {
set_status_ready();
return;
}
bsnprintf(cmd, sizeof(cmd),
"run job=\"%s\" fileset=\"%s\" level=%s client=\"%s\" pool=\"%s\" "
- "when=\"%s\" where=\"%s\" storage=\"%s\"",
- job, fileset, level, client, pool, when, where, storage);
+ "when=\"%s\" where=\"%s\" storage=\"%s\" priority=\"%s\"",
+ job, fileset, level, client, pool, when, where, storage, priority);
write_director(cmd);
set_text(cmd, strlen(cmd));
write_director("yes");
recycle = strcmp(dev->VolCatInfo.VolCatStatus, "Recycle") == 0;
break; /* got a Volume */
case VOL_NAME_ERROR:
- VOLUME_CAT_INFO VolCatInfo, devVolCatInfo;
+ VOLUME_CAT_INFO dcrVolCatInfo, devVolCatInfo;
/* If not removable, Volume is broken */
if (!dev->is_removable()) {
* this volume is really OK. If not, put back the desired
* volume name, mark it not in changer and continue.
*/
- memcpy(&VolCatInfo, &dcr->VolCatInfo, sizeof(VolCatInfo));
+ memcpy(&dcrVolCatInfo, &dcr->VolCatInfo, sizeof(dcrVolCatInfo));
memcpy(&devVolCatInfo, &dev->VolCatInfo, sizeof(devVolCatInfo));
/* Check if this is a valid Volume in the pool */
bstrncpy(dcr->VolumeName, dev->VolHdr.VolumeName, sizeof(dcr->VolumeName));
/* This gets the info regardless of the Pool */
bstrncpy(dcr->VolumeName, dev->VolHdr.VolumeName, sizeof(dcr->VolumeName));
if (autochanger && !dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) {
+ /*
+ * If we get here, we know we cannot write on the Volume,
+ * and we know that we cannot read it either, so it
+ * is not in the autochanger.
+ */
mark_volume_not_inchanger(dcr);
}
memcpy(&dev->VolCatInfo, &devVolCatInfo, sizeof(dev->VolCatInfo));
Jmsg(jcr, M_WARNING, 0, _("Director wanted Volume \"%s\".\n"
" Current Volume \"%s\" not acceptable because:\n"
" %s"),
- VolCatInfo.VolCatName, dev->VolHdr.VolumeName,
+ dcrVolCatInfo.VolCatName, dev->VolHdr.VolumeName,
jcr->dir_bsock->msg);
ask = true;
+ /* Restore saved DCR before continuing */
+ memcpy(&dcr->VolCatInfo, &dcrVolCatInfo, sizeof(dcr->VolCatInfo));
goto mount_next_vol;
}
- /* This was not the volume we expected, but it is OK with
+ /*
+ * This was not the volume we expected, but it is OK with
* the Director, so use it.
*/
Dmsg1(150, "want new name=%s\n", dcr->VolumeName);
#undef VERSION
#define VERSION "1.39.22"
-#define BDATE "06 Septermber 2006"
-#define LSMDATE "06Sep06"
+#define BDATE "07 Septermber 2006"
+#define LSMDATE "07Sep06"
#define BYEAR "2006" /* year for copyright messages in progs */
/* Debug flags */
General:
07Sep06
+kes Apply patch supplied in bug #656 to pass priority field
+ in the run dialog to the Director.
+kes Restore DCR after VOL_NAME_ERROR in mount.c. Hopefully
+ this will fix bug #627 where Bacula eventually gets
+ confused about what Volume it wants.
kes Add a new close_part() class in the SD to save the device
state around open/close_part/open for DVD writing. This
should fix the num_dvd_parts getting zeroed as reported by