From: Eric Bollengier Date: Fri, 11 Nov 2022 14:49:40 +0000 (+0100) Subject: Fix error message after connect() in filed and stored X-Git-Tag: Beta-15.0.0~366 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ce5cc6b2c9381597444c8cfc56f1b7ab5bf340;p=thirdparty%2Fbacula.git Fix error message after connect() in filed and stored --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index e487f8a23..db3bca625 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -2815,12 +2815,9 @@ static int storage_cmd(JCR *jcr) sd->set_source_address(me->FDsrc_addr); if (!sd->connect(jcr, 10, (int)me->SDConnectTimeout, me->heartbeat_interval, _("Storage daemon"), jcr->stored_addr, NULL, stored_port, 1)) { + Jmsg(jcr, M_FATAL, 0, "%s", sd->errmsg); /* destroy() OK because sd is local */ sd->destroy(); - Jmsg2(jcr, M_FATAL, 0, _("Failed to connect to Storage daemon: %s:%d\n"), - jcr->stored_addr, stored_port); - Dmsg2(100, "Failed to connect to Storage daemon: %s:%d\n", - jcr->stored_addr, stored_port); goto bail_out; } diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 89c258898..5e8680360 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -338,8 +338,6 @@ static bool client_cmd(JCR *jcr) _("Client daemon"), jcr->client_addr, NULL, jcr->client_port, 1)) { /* destroy() OK because cl is local */ Jmsg(jcr, M_FATAL, 0, "%s", cl->errmsg); - Dmsg2(100, "Failed to connect to Client daemon: %s:%d\n", - jcr->client_addr, jcr->client_port); cl->destroy(); goto bail_out; } @@ -399,12 +397,9 @@ static bool storage_cmd(JCR *jcr) /* Try to connect for 1 hour at 10 second intervals */ if (!sd->connect(jcr, 10, (int)me->ClientConnectTimeout, me->heartbeat_interval, _("Storage daemon"), jcr->stored_addr, NULL, stored_port, 1)) { + Jmsg(jcr, M_FATAL, 0, "%s", sd->errmsg); /* destroy() OK because sd is local */ sd->destroy(); - Jmsg(jcr, M_FATAL, 0, _("[SF0104] Failed to connect to Storage daemon: %s:%d\n"), - jcr->stored_addr, stored_port); - Dmsg2(010, "Failed to connect to Storage daemon: %s:%d\n", - jcr->stored_addr, stored_port); goto bail_out; }