check success of library_init()
This commit is contained in:
@@ -637,8 +637,13 @@ int main(int argc, char *argv[])
|
||||
} operation = OP_USAGE;
|
||||
|
||||
dbg = dbg_stderr;
|
||||
library_init(STRONGSWAN_CONF);
|
||||
atexit(library_deinit);
|
||||
|
||||
/* initialize library */
|
||||
if (!library_init(STRONGSWAN_CONF))
|
||||
{
|
||||
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
|
||||
}
|
||||
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
|
||||
lib->settings->get_str(lib->settings, "pool.load", PLUGINS));
|
||||
|
||||
|
||||
+5
-1
@@ -282,7 +282,11 @@ int main(int argc, char **argv)
|
||||
openlog("openac", 0, LOG_AUTHPRIV);
|
||||
|
||||
/* initialize library */
|
||||
library_init(STRONGSWAN_CONF);
|
||||
if (!library_init(STRONGSWAN_CONF))
|
||||
{
|
||||
library_deinit();
|
||||
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
|
||||
}
|
||||
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
|
||||
lib->settings->get_str(lib->settings, "openac.load", PLUGINS));
|
||||
|
||||
|
||||
@@ -386,8 +386,14 @@ int main(int argc, char **argv)
|
||||
scep_response = chunk_empty;
|
||||
log_to_stderr = TRUE;
|
||||
|
||||
/* initialize library and optionsfrom */
|
||||
library_init(STRONGSWAN_CONF);
|
||||
/* initialize library */
|
||||
if (!library_init(STRONGSWAN_CONF))
|
||||
{
|
||||
library_deinit();
|
||||
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
|
||||
}
|
||||
|
||||
/* initialize optionsfrom */
|
||||
options = options_create();
|
||||
|
||||
for (;;)
|
||||
|
||||
Reference in New Issue
Block a user