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.
This commit is contained in:
Jon Siwek 2020-06-08 18:02:44 -07:00
parent 02476453bc
commit 4f011a65f4

View file

@ -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);