[pacman-dev] [PATCH 1/4] add curl to alpm initialization and teardown routines

Dan McGee dpmcgee at gmail.com
Sun Jan 2 21:24:28 EST 2011


On Sun, Jan 2, 2011 at 7:13 PM, Dave Reisner <d at falconindy.com> wrote:
> Signed-off-by: Dave Reisner <d at falconindy.com>
> ---
>  lib/libalpm/alpm.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
> index 3f9cfff..44c513e 100644
> --- a/lib/libalpm/alpm.c
> +++ b/lib/libalpm/alpm.c
> @@ -27,6 +27,9 @@
>  #ifdef HAVE_LIBFETCH
>  #include <fetch.h>
>  #endif
> +#ifdef HAVE_LIBCURL
> +#include <curl/curl.h>
> +#endif
>
>  /* libalpm */
>  #include "alpm.h"
> @@ -63,6 +66,10 @@ int SYMEXPORT alpm_initialize(void)
>        fetchConnectionCacheInit(5, 1);
>  #endif
>
> +#ifdef HAVE_LIBCURL
> +       curl_global_init(CURL_GLOBAL_NOTHING);
SSL functionality would be nice to at least have as an option- seems
like most people init this with _ALL.

> +#endif
> +
>        return(0);
>  }
>
> @@ -86,6 +93,10 @@ int SYMEXPORT alpm_release(void)
>        fetchConnectionCacheClose();
>  #endif
>
> +#ifdef HAVE_LIBCURL
> +       curl_global_cleanup();
> +#endif
> +
>        return(0);
>  }
>
> --
> 1.7.3.4
>
>
>


More information about the pacman-dev mailing list