summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0013-Exclude-SMTP-errors-from-sending-over-SMTP.patch
blob: ce77c2109a6b80e68fb36c5fcf0034175170d883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 0e3da8208d0a5b478b6c8f9880efebe2269539b3 Mon Sep 17 00:00:00 2001
From: "Evgeny Alekseev (IBS Group)" <ealekseev@ibs.sila.ru>
Date: Mon, 17 Oct 2022 17:30:39 +0300
Subject: [PATCH] Exclude SMTP errors from sending over SMTP

---
 src/redfish2phosphor-logs.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/redfish2phosphor-logs.cpp b/src/redfish2phosphor-logs.cpp
index 8c2aa6d9..4c62f753 100644
--- a/src/redfish2phosphor-logs.cpp
+++ b/src/redfish2phosphor-logs.cpp
@@ -25,6 +25,7 @@ static constexpr char ARG_DELIMITER = '$';
 static constexpr auto ARG_COUNT = 4;
 
 static constexpr auto excluded_messages = std::array{"SELEntryAdded"};
+static constexpr auto smtp_excluded_messages = std::array{"SELEntryAdded", "SMTPError"};
 
 enum class level
 {
@@ -216,8 +217,8 @@ int main(int argc, char* argv[])
     }
     try
     {
-        if (std::find(excluded_messages.begin(), excluded_messages.end(),
-                      std::get<0>(*message)) == excluded_messages.end())
+        if (std::find(smtp_excluded_messages.begin(), smtp_excluded_messages.end(),
+                      std::get<0>(*message)) == smtp_excluded_messages.end())
         {
             dbusCallMethodNoReturn(
                 getBus(), "xyz.openbmc_project.SMTP"s,