From: Michal Rakowski Date: Tue, 9 Nov 2021 11:07:16 +0000 (+0100) Subject: Fix #8343 About weird output characters after stopping job X-Git-Tag: Release-11.3.2~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2ef4bdf4c5c884596419d4ba78381ec93ffc60a;p=thirdparty%2Fbacula.git Fix #8343 About weird output characters after stopping job --- diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index d9b0ce97c..978b730d2 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -237,13 +237,15 @@ void do_client_commands(JCR *jcr) /* Note fd->msg command may be destroyed by comm activity */ if (!job_canceled(jcr) && !jcr->is_incomplete()) { strip_trailing_junk(fd->msg); + char buf[64]; if (jcr->errmsg[0]) { strip_trailing_junk(jcr->errmsg); Jmsg2(jcr, M_FATAL, 0, _("Command error with FD msg=\"%s\", SD hanging up. ERR=%s\n"), - fd->msg, jcr->errmsg); + asciidump(fd->msg, fd->msglen, buf, sizeof(buf)), + jcr->errmsg); } else { Jmsg1(jcr, M_FATAL, 0, _("Command error with FD msg=\"%s\", SD hanging up.\n"), - fd->msg); + asciidump(fd->msg, fd->msglen, buf, sizeof(buf))); } jcr->setJobStatus(JS_ErrorTerminated); }