From 4b982619a3a275e7ee9d607c7e3eb9a348f8fe6b Mon Sep 17 00:00:00 2001 From: graham.gower Date: Sun, 15 Nov 2009 19:32:24 -0500 Subject: atexit() isn't really appropriate for a library. git-svn-id: http://opkg.googlecode.com/svn/trunk@313 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg_download.c') diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index ab21ae9..be3ae2a 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -68,7 +68,6 @@ static X509_STORE *setup_verify(opkg_conf_t *conf, char *CAfile, char *CApath); * each time */ static CURL *curl = NULL; -static void opkg_curl_cleanup(void); static CURL *opkg_curl_init(opkg_conf_t *conf, curl_progress_func cb, void *data); #endif @@ -530,7 +529,7 @@ end: #endif #ifdef HAVE_CURL -static void opkg_curl_cleanup(void){ +void opkg_curl_cleanup(void){ if(curl != NULL){ curl_easy_cleanup (curl); curl = NULL; @@ -635,12 +634,6 @@ static CURL *opkg_curl_init(opkg_conf_t *conf, curl_progress_func cb, void *data curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, userpwd); free (userpwd); } - - /* add curl cleanup callback */ - if(!atexit(opkg_curl_cleanup)){ - opkg_message(conf,OPKG_DEBUG, "Failed to register atexit curl cleanup function\n"); - } - } curl_easy_setopt (curl, CURLOPT_NOPROGRESS, (cb == NULL)); -- cgit v0.9.1