Deprecate BroFile::GetFile(), replace with BroFile::Get()

This commit is contained in:
Jon Siwek 2020-05-15 17:22:16 -07:00
parent 65aad4922d
commit 599eec297c
3 changed files with 9 additions and 11 deletions

View file

@ -346,16 +346,11 @@ double BroFile::Size()
return s.st_size;
}
BroFile* BroFile::GetFile(const char* name)
IntrusivePtr<BroFile> BroFile::Get(const char* name)
{
for ( const auto &el : open_files )
{
if ( el.first == name )
{
Ref(el.second);
return el.second;
}
}
return {NewRef{}, el.second};
return new BroFile(name, "w");
return make_intrusive<BroFile>(name, "w");
}