From 4f011a65f4313e8dcf351900b7570ff5ab7b0bc0 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 8 Jun 2020 18:02:44 -0700 Subject: [PATCH] Remove not-useful code in iosource::Manager::OpenPktSrc It's generally expected for a PktSrc to not be Open yet right after instantiation, but rather from InitSource() called during the registration process. Besides that, the logic in question would potentially replace an error message that is useful/detailed with one that is not. --- src/iosource/Manager.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/iosource/Manager.cc b/src/iosource/Manager.cc index d97b585894..ec13f32871 100644 --- a/src/iosource/Manager.cc +++ b/src/iosource/Manager.cc @@ -371,10 +371,6 @@ PktSrc* Manager::OpenPktSrc(const std::string& path, bool is_live) PktSrc* ps = (*component->Factory())(npath, is_live); assert(ps); - if ( ! ps->IsOpen() && ps->IsError() ) - // Set an error message if it didn't open successfully. - ps->Error("could not open"); - DBG_LOG(DBG_PKTIO, "Created packet source of type %s for %s", component->Name().c_str(), npath.c_str()); Register(ps);