From: Radosław Korzeniewski Date: Mon, 7 Dec 2020 15:11:09 +0000 (+0100) Subject: ptcomm: Fix get_backend_pid regression. X-Git-Tag: Release-11.3.2~743 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad3beda04d20a240ba8552c08e80c45cd4078d5e;p=thirdparty%2Fbacula.git ptcomm: Fix get_backend_pid regression. --- diff --git a/bacula/src/plugins/fd/pluginlib/ptcomm.h b/bacula/src/plugins/fd/pluginlib/ptcomm.h index b9197d60b..b0620c065 100644 --- a/bacula/src/plugins/fd/pluginlib/ptcomm.h +++ b/bacula/src/plugins/fd/pluginlib/ptcomm.h @@ -185,7 +185,7 @@ public: * * @return int backend PID - when backend available; -1 - when backend is unavailable */ - int get_backend_pid() { return (bpipe != NULL) * bpipe->worker_pid - (bpipe == NULL); } + int get_backend_pid() { return (bpipe != NULL) ? bpipe->worker_pid : -1; } /** * @brief Sets a BPIPE object for our main communication channel.