]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
metaplugin: Correct error message format.
authorRadosław Korzeniewski <radekk@inteos.pl>
Fri, 8 Jan 2021 14:20:23 +0000 (15:20 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:00 +0000 (09:03 +0100)
bacula/src/plugins/fd/pluginlib/metaplugin.cpp

index f6faf29cc958165ddb5e4186ad6ca744ebb5fcc1..fedb0876882bd7acd270dc671d7240cc92d5d6b1 100644 (file)
@@ -869,14 +869,17 @@ bRC METAPLUGIN::send_startjob(bpContext *ctx, const char *command)
    POOL_MEM cmd;
 
    pm_strcpy(cmd, command);
-   if (backend.ctx->write_command(ctx, cmd) < 0){
+   if (backend.ctx->write_command(ctx, cmd) < 0)
+   {
       /* error */
       return bRC_Error;
    }
 
-   if (!backend.ctx->read_ack(ctx)){
-      DMSG(ctx, DERROR, "Wrong backend response to %s command.\n", command);
-      JMSG(ctx, backend.ctx->jmsg_err_level(), "Wrong backend response to %s command.\n", command);
+   if (!backend.ctx->read_ack(ctx))
+   {
+      strip_trailing_newline(cmd.c_str());
+      DMSG(ctx, DERROR, "Wrong backend response to %s command.\n", cmd.c_str());
+      JMSG(ctx, backend.ctx->jmsg_err_level(), "Wrong backend response to %s command.\n", cmd.c_str());
       return bRC_Error;
    }