#define CHECKSUM_LIBRARY IPSEC_LIB_DIR"/libchecksum.so"
+#ifndef STRONGSWAN_CONF
+#define STRONGSWAN_CONF NULL
+#endif
+
typedef struct private_library_t private_library_t;
/**
utils_deinit();
threads_deinit();
+ free(this->public.conf);
free((void*)this->public.ns);
free(this);
lib = NULL;
.get = _get,
.set = _set,
.ns = strdup(namespace ?: "libstrongswan"),
+ .conf = strdupnull(settings ?: STRONGSWAN_CONF),
},
.ref = 1,
);
this->objects = hashtable_create((hashtable_hash_t)hash,
(hashtable_equals_t)equals, 4);
-#ifdef STRONGSWAN_CONF
- if (!settings)
- {
- settings = STRONGSWAN_CONF;
- }
-#endif
- this->public.settings = settings_create(settings);
+ this->public.settings = settings_create(this->public.conf);
/* all namespace settings may fall back to libstrongswan */
lib->settings->add_fallback(lib->settings, lib->ns, "libstrongswan");