Re: [PATCH v2] Work around curl-gnutls not liking to be reinitialized
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 8, 2008, 22:51 UTC
- Message-ID
- <alpine.LSU.1.00.0802082250550.11591@racer.site>
- In-Reply-To
- <1202509359-23840-1-git-send-email-mh@glandium.org>
Hi,
On Fri, 8 Feb 2008, Mike Hommey wrote:
Show 16 quoted lines
> diff --git a/http.c b/http.c
> index d2c11ae..a3aa9e9 100644
> --- a/http.c
> +++ b/http.c
> @@ -215,9 +215,14 @@ static CURL* get_curl_handle(void)
>
> void http_init(void)
> {
> + static int init = 0;
> char *low_speed_limit;
> char *low_speed_time;
>
> + if (init)
> + return;
> + init = 1;
> +Don't you have to make this conditional on the CURL version as well? I mean, that cleanup:
Show 11 quoted lines
> diff --git a/transport.c b/transport.c > index babaa21..32ab521 100644 > --- a/transport.c > +++ b/transport.c > @@ -473,7 +473,9 @@ static struct ref *get_refs_via_curl(struct transport *transport) > return NULL; > } > > +#if (LIBCURL_VERSION_NUM < 0x071003) || (LIBCURL_VERSION_NUM > 0x071200) > http_cleanup(); > +#endif
requires us to init again, no?
Ciao, Dscho