cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl 7.16.x and multi interface

From: Eygene Ryabinkin <rea-curly_at_codelabs.ru>
Date: Wed, 28 Feb 2007 18:00:07 +0300

Good day!

I am trying to fight with GIT over HTTP: it delivers cores for me.
I've traced the problem to the CURL library.

First problem: when two easy connections are using the same
physical connection (and thus the same 'struct connectdata *') and
one of the connections is closed via Curl_disconnect, the pointer
freed by conn_free(conn) function will be dangling for the other
'easy'. This can be cured by the reference counting before calling
conn_free(). I've implemented this.

But another problem is that when the physical connection is dead,
as detected in ConnectionExists() the Curl_disconnect should
notify all 'easy' connections sharing this one. I've tried to
do this by setting the easy->easy_conn to NULL and easy->state
to COMPLETED. But this proved to be the wrong solution: I started
to have the never-ending connections or started to catch weird
404 codes.

The patch is attached. I was working at FreeBSD, so there is
an additional patch stanza for the lib/url.c -- it comes from
the FreeBSD ports patch. Perhaps it can be integrated into the
mainstream CURL too. The patch is rather crude and it has all
the guts on the outside to ease the debugging.

-- 
Eygene

Received on 2007-02-28