From: Kern Sibbald Date: Thu, 17 Apr 2008 16:55:40 +0000 (+0000) Subject: kes Fix bat seg fault at termination. X-Git-Tag: Release-7.0.0~4694 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8bf7fa68f7b1c8c2c0c39cd3d8114f4f88f0d86c;p=bacula%2Fbacula kes Fix bat seg fault at termination. kes Add Bacula generated version to bat about box. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6838 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index f3e3ae4577..77106b2bb8 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2008 Free Software Foundation Europe e.V. + Copyright (C) 2007-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -103,9 +103,11 @@ void Console::poll_messages() void Console::terminate() { if (m_sock) { - notify(false); - delete m_notifier; - m_notifier = NULL; + if (m_notifier) { + m_notifier->setEnabled(false); + delete m_notifier; + m_notifier = NULL; + } stopTimer(); m_sock->close(); m_sock = NULL; diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 0e65eb8c06..fa5870fde5 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -36,6 +36,7 @@ */ #include "bat.h" +#include "version.h" #include "joblist/joblist.h" #include "storage/storage.h" #include "fileset/fileset.h" @@ -253,11 +254,6 @@ void MainWin::closeEvent(QCloseEvent *event) { 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(); @@ -275,6 +271,11 @@ void MainWin::closeEvent(QCloseEvent *event) } } } + foreach(Console *console, m_consoleHash){ + console->writeSettings(); + console->terminate(); + console->closeStackPage(); + } event->accept(); } @@ -490,7 +491,7 @@ void MainWin::input_line() void MainWin::about() { QMessageBox::about(this, tr("About bat"), - tr("

bat 1.0, by Dirk H Bartley and Kern Sibbald

" + tr("

bat " VERSION "(" BDATE "), by Dirk H Bartley and Kern Sibbald

" "

Copyright © 2007-" BYEAR " Free Software Foundation Europe e.V." "

The bat is an administrative console" " interface to the Director.")); diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 6940c2f8d8..12dcd636e6 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -24,6 +24,10 @@ Add long term statistics job table General: +17Apr08 +kes Fix bat seg fault at termination. +kes Add Bacula generated version to bat about box. + 16Apr08 kes Experiment with allowing multiple read jobs. kes Move final volume swapping code to DCR method and