diff options
author | Ed Tanous <edtanous@google.com> | 2023-07-25 21:12:19 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-07-25 22:12:27 +0300 |
commit | 1306101e16e574bbdbfbf4b594699396d4c80e08 (patch) | |
tree | 69040d92c7e4461d4014a9ca378a56e87760df7a /redfish-core | |
parent | 3f5eb7550d208c2d854e54f64b546bcfb87e6dca (diff) | |
download | bmcweb-1306101e16e574bbdbfbf4b594699396d4c80e08.tar.xz |
Add error code check for snmp
When SNMP isn't present, and the name is not activatable, (becuase snmp
isn't installed) it returns a 113 error code. We should handle this
silently, rather than returning an internal error, because snmp is
optional.
Tested: Ran redfish service validator on a system without phosphor-snmp
installed, and observed no more error on
/redfish/v1/EventService/Subscriptions.
Change-Id: I2254d763de6c55c678a95765e1bc87fb9aaa9564
Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'redfish-core')
-rw-r--r-- | redfish-core/lib/event_service.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp index 35e3a1cfb9..30103badf0 100644 --- a/redfish-core/lib/event_service.hpp +++ b/redfish-core/lib/event_service.hpp @@ -192,7 +192,7 @@ inline void doSubscriptionCollection( { if (ec) { - if (ec.value() == EBADR) + if (ec.value() == EBADR || ec.value() == EHOSTUNREACH) { // This is an optional process so just return if it isn't there return; |