]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/dird/ua_collect.c
authorEric Bollengier <eric@baculasystems.com>
Fri, 24 Apr 2020 16:01:57 +0000 (18:01 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 29 Apr 2021 08:44:17 +0000 (10:44 +0200)
This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Fri Apr 17 18:33:43 2020 +0200

    Update Bacula Systems Copyright

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Wed May 1 15:24:21 2019 +0200

    Accept |script in the Client Address directive

bacula/src/dird/ua_collect.c

index e1063815f4f9098a7a294576aa0402b07cd28912..716060fa729ee4a0e83afebc9f5ff9297dc0feb4 100644 (file)
@@ -19,7 +19,7 @@
 /*
  *   Bacula Director -- User Agent Collector Commands
  *
- * Radosław Korzeniewski, MMXVIII
+ * Radoslaw Korzeniewski, MMXVIII
  * radoslaw@korzeniewski.net, radekk@inteos.pl
  * Inteos Sp. z o.o. http://www.inteos.pl/
  *
@@ -371,7 +371,7 @@ void do_collect_client(UAContext *ua, CLIENT *client, bool doall, display_format
 
    /* Try to connect for 15 seconds */
    if (!ua->api) ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
-                              client->name(), client->address(buf.addr()), client->FDport);
+                              client->name(), get_client_address(ua->jcr, client, buf.addr()), client->FDport);
    if (!connect_to_file_daemon(ua->jcr, 1, 15, 0)) {
       ua->send_msg(_("Failed to connect to Client %s.\n====\n"),
          client->name());
@@ -516,6 +516,7 @@ int collect_cmd(UAContext *ua, const char *cmd)
          Dmsg0(20, "statistics format Full\n");
          continue;
       }
+
       if (strcasecmp(ua->argk[i], "json") == 0){
          format = COLLECT_JSON;
          Dmsg0(20, "statistics format JSON\n");