summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_download.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 19:32:24 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 19:32:24 (EST)
commit4b982619a3a275e7ee9d607c7e3eb9a348f8fe6b (patch)
treeb6f5e4355db4fd9dc6af563ffe5d9d089156ccb9 /libopkg/opkg_download.c
parent1d5ae88a857c30dfb860cefb59fdefcfcbc1035a (diff)
atexit() isn't really appropriate for a library.
git-svn-id: http://opkg.googlecode.com/svn/trunk@313 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_download.c')
-rw-r--r--libopkg/opkg_download.c9
1 files changed, 1 insertions, 8 deletions
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));