mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
main: Finish processing program arguments before setting up SSL/sqlite
This commit is contained in:
parent
0699b28893
commit
7edebe179f
1 changed files with 7 additions and 7 deletions
14
src/main.cc
14
src/main.cc
|
@ -660,6 +660,9 @@ int main(int argc, char** argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( interfaces.length() > 0 && read_files.length() > 0 )
|
||||||
|
usage(1);
|
||||||
|
|
||||||
atexit(atexit_handler);
|
atexit(atexit_handler);
|
||||||
set_processing_status("INITIALIZING", "main");
|
set_processing_status("INITIALIZING", "main");
|
||||||
|
|
||||||
|
@ -688,17 +691,14 @@ int main(int argc, char** argv)
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
|
||||||
int r = sqlite3_initialize();
|
|
||||||
|
|
||||||
if ( r != SQLITE_OK )
|
|
||||||
reporter->Error("Failed to initialize sqlite3: %s", sqlite3_errstr(r));
|
|
||||||
|
|
||||||
// FIXME: On systems that don't provide /dev/urandom, OpenSSL doesn't
|
// FIXME: On systems that don't provide /dev/urandom, OpenSSL doesn't
|
||||||
// seed the PRNG. We should do this here (but at least Linux, FreeBSD
|
// seed the PRNG. We should do this here (but at least Linux, FreeBSD
|
||||||
// and Solaris provide /dev/urandom).
|
// and Solaris provide /dev/urandom).
|
||||||
|
|
||||||
if ( interfaces.length() > 0 && read_files.length() > 0 )
|
int r = sqlite3_initialize();
|
||||||
usage(1);
|
|
||||||
|
if ( r != SQLITE_OK )
|
||||||
|
reporter->Error("Failed to initialize sqlite3: %s", sqlite3_errstr(r));
|
||||||
|
|
||||||
#ifdef USE_IDMEF
|
#ifdef USE_IDMEF
|
||||||
char* libidmef_dtd_path_cstr = new char[libidmef_dtd_path.length() + 1];
|
char* libidmef_dtd_path_cstr = new char[libidmef_dtd_path.length() + 1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue