]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix timer looping on disconnect
authorKern Sibbald <kern@sibbald.com>
Tue, 22 May 2007 20:43:33 +0000 (20:43 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 22 May 2007 20:43:33 +0000 (20:43 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4880 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/console/console.cpp

index 774874d027b3857a2cd27561a78217a3502bfb4f..26a7b21010103ad1a78c1c33cb914d2c66ebede2 100644 (file)
@@ -96,9 +96,9 @@ void Console::poll_messages()
 void Console::terminate()
 {
    if (m_sock) {
+      stopTimer();
       m_sock->close();
       m_sock = NULL;
-      stopTimer();
    }
 }
 
@@ -688,9 +688,9 @@ int Console::read()
       }
       if (is_bnet_stop(m_sock)) {         /* error or term request */
          if (mainWin->m_commDebug) Pmsg0(000, "BNET STOP\n");
+         stopTimer();
          m_sock->close();
          m_sock = NULL;
-         stopTimer();
          mainWin->actionConnect->setIcon(QIcon(":images/disconnected.png"));
          QBrush redBrush(Qt::red);
          QTreeWidgetItem *item = mainWin->getFromHash(this);
@@ -803,6 +803,8 @@ bool Console::preventInUseConnect()
  */
 static int tls_pem_callback(char *buf, int size, const void *userdata)
 {
+   (void)size;
+   (void)userdata;
 #ifdef HAVE_TLS
    const char *prompt = (const char *)userdata;
 # if defined(HAVE_WIN32)