]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #6557 Suppress message "Error: bsock.c:394 Wrote 4 bytes" after a BNET_TERMINATE
authorAlain Spineux <alain@baculasystems.com>
Fri, 24 Jul 2020 12:36:06 +0000 (14:36 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:17 +0000 (15:36 +0100)
    - Quiet this type of message
      Error: bsock.c:394 Wrote 4 bytes ..... , but only 0 accepted.
    - Don't fix the issue that generate the message, just suppress the message.

bacula/src/lib/bsock.c

index b8a03f4ac7682ab540c5c56a36f7064f99dc6d07..84d9b1f88c0b8f9f2c0a1f25231981a7cafbb3bc 100644 (file)
@@ -391,9 +391,11 @@ bool BSOCK::send(int aflags)
                   m_host, m_port, this->bstrerror());
          }
       } else {
-         Qmsg5(m_jcr, M_ERROR, 0,
-               _("Wrote %d bytes to %s:%s:%d, but only %d accepted.\n"),
-               pktsiz, m_who, m_host, m_port, rc);
+         if (!m_suppress_error_msgs) {
+            Qmsg5(m_jcr, M_ERROR, 0,
+                  _("Wrote %d bytes to %s:%s:%d, but only %d accepted.\n"),
+                  pktsiz, m_who, m_host, m_port, rc);
+         }
       }
       ok = false;
    }