Refactor search_for_file() util function.

It was getting too bloated and allocated memory in ways that were
difficult to understand how to manage.  Separated out primarily in to
new find_file() and open_file()/open_package() functions.

Also renamed other util functions for path-related things.
This commit is contained in:
Jon Siwek 2013-10-07 15:01:03 -05:00
parent 68227f112d
commit 90477df973
9 changed files with 331 additions and 304 deletions

View file

@ -294,7 +294,8 @@ void OSFingerprint::load_config(const char* file)
uint32 ln=0;
char buf[MAXLINE];
char* p;
FILE* c = search_for_file(file, "osf", 0, false, 0);
FILE* c = open_file(find_file(file, bro_path(), "osf"));
if (!c)
{