From 9b627b6388e0f5b27097e865aca09c9f37bea9b5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 1 Feb 2008 11:51:52 +0000 Subject: [PATCH] Shutdown notifier before closing socket git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6354 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/console/console.cpp | 3 +++ bacula/src/qt-console/main.cpp | 5 ++--- bacula/src/qt-console/mainwin.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index fd4273b3b6..a84de24645 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -103,6 +103,9 @@ void Console::poll_messages() void Console::terminate() { if (m_sock) { + notify(false); + delete m_notifier; + m_notifier = NULL; stopTimer(); m_sock->close(); m_sock = NULL; diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index 8aa2b39f39..139a33778b 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2008 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. @@ -142,9 +142,8 @@ int main(int argc, char *argv[]) return app->exec(); } -void terminate_console(int sig) +void terminate_console(int /*sig*/) { - (void)sig; /* avoid compiler complaints */ exit(0); } diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 92cc016051..e3c43ed662 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2008 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. -- 2.39.5