From 1306101e16e574bbdbfbf4b594699396d4c80e08 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 25 Jul 2023 11:12:19 -0700 Subject: 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 --- redfish-core/lib/event_service.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'redfish-core') 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; -- cgit v1.2.3