---
src/curl_download.c | 6 ++++++
src/curl_download.h | 1 +
src/main.c | 2 ++
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/curl_download.c b/src/curl_download.c
index dbbcfa6..fe7774a 100644
--- a/src/curl_download.c
+++ b/src/curl_download.c
@@ -141,6 +141,12 @@ void curl_download_init()
curl_download_user_agent = g_strdup_printf ("%s/%s %s", PACKAGE, VERSION,
curl_version());
}
+/* This should to be called from main() to make sure thread safe */
+void curl_download_uninit()
+{
+ curl_global_cleanup();
+}
+
int curl_download_uri ( const char *uri, FILE *f, DownloadMapOptions *options,
DownloadFileOptions *file_options, void *handle )
{
CURL *curl;
diff --git a/src/curl_download.h b/src/curl_download.h
index 67e7396..86022ed 100644
--- a/src/curl_download.h
+++ b/src/curl_download.h
@@ -27,6 +27,7 @@
#include "download.h"
void curl_download_init ();
+void curl_download_uninit ();
int curl_download_get_url ( const char *hostname, const char *uri, FILE *f,
DownloadMapOptions *options, gboolean ftp, DownloadFileOptions *file_options,
void *handle );
int curl_download_uri ( const char *uri, FILE *f, DownloadMapOptions *options,
DownloadFileOptions *file_options, void *handle );
void * curl_download_handle_init ();
diff --git a/src/main.c b/src/main.c
index f3e2a71..b3fdc38 100644
--- a/src/main.c
+++ b/src/main.c
@@ -212,5 +212,7 @@ int main( int argc, char *argv[] )
a_dems_uninit ();
a_preferences_uninit ();
+ curl_download_uninit();
+
return 0;
}
--
1.7.2.3
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Viking-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/