{
m_isClosing = true;
writeSettings();
+ /*
+ * Close the console pages before non-console pages so that
+ * the notifier is turned off. Otherwise it prints an error when
+ * the page it is using gets destroyed.
+ */
+ foreach(Console *console, m_consoleHash){
+ console->writeSettings();
+ console->terminate();
+ console->closeStackPage();
+ }
/* close all non console pages, this will call settings in destructors */
while (m_consoleHash.count() < m_pagehash.count()) {
foreach(Pages *page, m_pagehash) {
}
}
}
- /* close the console pages and terminate connection */
- foreach(Console *console, m_consoleHash){
- console->writeSettings();
- console->terminate();
- console->closeStackPage();
- }
event->accept();
}
JCR *jcr = dcr->jcr;
BSOCK *dir = jcr->dir_bsock;
bool rtn;
+ char lastVolume[MAX_NAME_LENGTH];
Dmsg2(200, "dir_find_next_appendable_volume: reserved=%d Vol=%s\n",
dcr->is_reserved(), dcr->VolumeName);
lock_volumes();
P(vol_info_mutex);
dcr->clear_found_in_use();
+ lastVolume[0] = 0;
for (int vol_index=1; vol_index < 20; vol_index++) {
bash_spaces(dcr->media_type);
bash_spaces(dcr->pool_name);
unbash_spaces(dcr->pool_name);
Dmsg1(100, ">dird %s", dir->msg);
if (do_get_volume_info(dcr)) {
+ /* Give up if we get the same volume name twice */
+ if (lastVolume[0] && strcmp(lastVolume, dcr->VolumeName) == 0) {
+ Dmsg1(100, "Got same vol = %s\n", lastVolume);
+ break;
+ }
+ bstrncpy(lastVolume, dcr->VolumeName, sizeof(lastVolume));
if (dcr->can_i_use_volume()) {
Dmsg1(100, "Call reserve_volume. Vol=%s\n", dcr->VolumeName);
if (reserve_volume(dcr, dcr->VolumeName) == 0) {
General:
+14Apr08
+kes Stop searching for Volumes in SD askdir if DIR returns the
+ same volume name twice in a row.
+kes Close bat console windows first to eliminate error message
+ from the notifier.
13Apr08
kes Tweak the swap Volume from one drive to another code so that
it now seems to work.