run(private_charon);
eap_method_unload();
+ fetcher_finalize();
/* normal termination, cleanup and exit */
destroy(private_charon);
unlink(PID_FILE);
#ifdef LIBCURL
CURLcode res;
- /* init libcurl */
+ /* initialize libcurl */
DBG1("initializing libcurl");
res = curl_global_init(CURL_GLOBAL_NOTHING);
if (res != CURLE_OK)
}
#endif /* LIBCURL */
}
+
+/**
+ * Described in header.
+ */
+void fetcher_finalize(void)
+{
+ #ifdef LIBCURL
+ /* finalize libcurl */
+ DBG1("finalizing libcurl");
+ curl_global_cleanup();
+#endif /* LIBCURL */
+}
+
*/
void fetcher_initialize(void);
+/**
+ * @brief Finalizes the fetcher_t class
+ *
+ * call this function only once befor exiting the main program
+ *
+ * @ingroup utils
+ */
+void fetcher_finalize(void);
+
#endif /*FETCHER_H_*/