Cleanup
This commit is contained in:
parent
d86a68f510
commit
eb70bf3fbc
15
common.c
15
common.c
|
@ -34,6 +34,21 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
init_openssl (void)
|
||||||
|
{
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
SSL_library_init ();
|
||||||
|
// XXX: this list is probably not complete
|
||||||
|
atexit (EVP_cleanup);
|
||||||
|
SSL_load_error_strings ();
|
||||||
|
atexit (ERR_free_strings);
|
||||||
|
#else
|
||||||
|
// Cleanup is done automatically via atexit()
|
||||||
|
OPENSSL_init_ssl (0, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// --- To be moved to liberty --------------------------------------------------
|
// --- To be moved to liberty --------------------------------------------------
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
|
|
10
degesch.c
10
degesch.c
|
@ -14009,15 +14009,7 @@ main (int argc, char *argv[])
|
||||||
app_context_init (&ctx);
|
app_context_init (&ctx);
|
||||||
g_ctx = &ctx;
|
g_ctx = &ctx;
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
init_openssl ();
|
||||||
SSL_library_init ();
|
|
||||||
atexit (EVP_cleanup);
|
|
||||||
SSL_load_error_strings ();
|
|
||||||
atexit (ERR_free_strings);
|
|
||||||
#else
|
|
||||||
// Cleanup is done automatically via atexit()
|
|
||||||
OPENSSL_init_ssl (0, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Bootstrap configuration, so that we can access schema items at all
|
// Bootstrap configuration, so that we can access schema items at all
|
||||||
register_config_modules (&ctx);
|
register_config_modules (&ctx);
|
||||||
|
|
11
kike.c
11
kike.c
|
@ -4043,16 +4043,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting");
|
print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting");
|
||||||
setup_signal_handlers ();
|
setup_signal_handlers ();
|
||||||
|
init_openssl ();
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
SSL_library_init ();
|
|
||||||
atexit (EVP_cleanup);
|
|
||||||
SSL_load_error_strings ();
|
|
||||||
atexit (ERR_free_strings);
|
|
||||||
#else
|
|
||||||
// Cleanup is done automatically via atexit()
|
|
||||||
OPENSSL_init_ssl (0, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct server_context ctx;
|
struct server_context ctx;
|
||||||
server_context_init (&ctx);
|
server_context_init (&ctx);
|
||||||
|
|
12
zyklonb.c
12
zyklonb.c
|
@ -2010,17 +2010,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting");
|
print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting");
|
||||||
setup_signal_handlers ();
|
setup_signal_handlers ();
|
||||||
|
init_openssl ();
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
SSL_library_init ();
|
|
||||||
// XXX: this list is probably not complete
|
|
||||||
atexit (EVP_cleanup);
|
|
||||||
SSL_load_error_strings ();
|
|
||||||
atexit (ERR_free_strings);
|
|
||||||
#else
|
|
||||||
// Cleanup is done automatically via atexit()
|
|
||||||
OPENSSL_init_ssl (0, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct bot_context ctx;
|
struct bot_context ctx;
|
||||||
bot_context_init (&ctx);
|
bot_context_init (&ctx);
|
||||||
|
|
Loading…
Reference in New Issue