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>
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 35e3a1c..30103ba 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -192,7 +192,7 @@
{
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;