add curl to alpm initialization and teardown routines
Signed-off-by: Dave Reisner <d@falconindy.com>
This commit is contained in:
parent
67391c2c6c
commit
75bfe825fc
3 changed files with 21 additions and 0 deletions
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* connection caching setup */
|
/* connection caching setup */
|
||||||
#ifdef HAVE_LIBFETCH
|
#ifdef HAVE_LIBFETCH
|
||||||
#include <fetch.h>
|
#include <fetch.h>
|
||||||
|
@ -69,6 +73,11 @@ int SYMEXPORT alpm_initialize(void)
|
||||||
fetchConnectionCacheInit(5, 1);
|
fetchConnectionCacheInit(5, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
curl_global_init(CURL_GLOBAL_SSL);
|
||||||
|
handle->curl = curl_easy_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +101,10 @@ int SYMEXPORT alpm_release(void)
|
||||||
fetchConnectionCacheClose();
|
fetchConnectionCacheClose();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
curl_global_cleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBFETCH
|
#ifdef HAVE_LIBFETCH
|
||||||
#include <fetch.h>
|
#include <fetch.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBFETCH
|
#ifdef HAVE_LIBFETCH
|
||||||
#include <fetch.h> /* fetchLastErrString */
|
#include <fetch.h> /* fetchLastErrString */
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue