]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/tray-monitor/tray-monitor.cpp
Backport from BEE
[bacula/bacula] / bacula / src / qt-console / tray-monitor / tray-monitor.cpp
index cd38ad75bee7976087ba2a8b1c5ffcd0b4889308..9a01a8a7b25df0f7eea8cb1f99a87c6154ddc3e8 100644 (file)
@@ -1,29 +1,17 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2004-2011 Free Software Foundation Europe e.V.
+   Copyright (C) 2004-2014 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.
-   This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version three of the GNU Affero General Public
-   License as published by the Free Software Foundation and included
-   in the file LICENSE.
+   The main author of Bacula is Kern Sibbald, with contributions from many
+   others, a complete list can be found in the file AUTHORS.
 
-   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 GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU Affero General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
 
    Bacula® is a registered trademark of Kern Sibbald.
-   The licensor of Bacula is the Free Software Foundation Europe
-   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-   Switzerland, email:ftf@fsfeurope.org.
 */
 
 #include "tray-ui.h"
@@ -96,7 +84,7 @@ void dotest()
 void get_list(monitoritem *item, const char *cmd, QStringList &lst)
 {
    int stat;
-   
+
    doconnect(item);
    item->writecmd(cmd);
    while((stat = bnet_recv(item->D_sock)) >= 0) {
@@ -121,7 +109,7 @@ void refresh_item()
          break;
       case R_STORAGE:
          cmd = "status";
-         break;          
+         break;
       default:
          exit(1);
          break;
@@ -136,7 +124,7 @@ void refresh_item()
  *
  */
 int main(int argc, char *argv[])
-{   
+{
    int ch, i, dir_index=-1;
    bool test_config = false;
    DIRRES* dird;
@@ -287,7 +275,7 @@ int main(int argc, char *argv[])
          break;
       case R_STORAGE:
          cmd = "status";
-         break;          
+         break;
       default:
          exit(1);
          break;
@@ -311,7 +299,7 @@ int main(int argc, char *argv[])
 
 
    (void)WSACleanup();               /* Cleanup Windows sockets */
-   
+
    config->free_resources();
    free(config);
    config = NULL;
@@ -344,7 +332,7 @@ void changeStatusMessage(monitoritem*, const char *fmt,...) {
    tray->statusbar->showMessage(QString(buf));
 }
 
-int doconnect(monitoritem* item) 
+int doconnect(monitoritem* item)
 {
    if (!item->D_sock) {
       memset(&jcr, 0, sizeof(jcr));
@@ -357,21 +345,21 @@ int doconnect(monitoritem* item)
       case R_DIRECTOR:
          dird = (DIRRES*)item->resource;
          changeStatusMessage(item, _("Connecting to Director %s:%d"), dird->address, dird->DIRport);
-         item->D_sock = bnet_connect(NULL, monitor->DIRConnectTimeout, 
+         item->D_sock = bnet_connect(NULL, monitor->DIRConnectTimeout,
                                      0, 0, _("Director daemon"), dird->address, NULL, dird->DIRport, 0);
          jcr.dir_bsock = item->D_sock;
          break;
       case R_CLIENT:
          filed = (CLIENT*)item->resource;
          changeStatusMessage(item, _("Connecting to Client %s:%d"), filed->address, filed->FDport);
-         item->D_sock = bnet_connect(NULL, monitor->FDConnectTimeout, 
+         item->D_sock = bnet_connect(NULL, monitor->FDConnectTimeout,
                                      0, 0, _("File daemon"), filed->address, NULL, filed->FDport, 0);
          jcr.file_bsock = item->D_sock;
          break;
       case R_STORAGE:
          stored = (STORE*)item->resource;
          changeStatusMessage(item, _("Connecting to Storage %s:%d"), stored->address, stored->SDport);
-         item->D_sock = bnet_connect(NULL, monitor->SDConnectTimeout, 
+         item->D_sock = bnet_connect(NULL, monitor->SDConnectTimeout,
                                      0, 0, _("Storage daemon"), stored->address, NULL, stored->SDport, 0);
          jcr.store_bsock = item->D_sock;
          break;
@@ -418,7 +406,7 @@ int doconnect(monitoritem* item)
    return 1;
 }
 
-int docmd(monitoritem* item, const char* command) 
+int docmd(monitoritem* item, const char* command)
 {
    int stat;
    //qDebug() << "docmd(" << item->get_name() << "," << command << ")";