cURL / Mailing Lists / curl-library / Single Mail


Problems with persistant connections

From: Andy Cedilnik <>
Date: 10 Jan 2003 09:34:05 -0500

Hi All,

I recently updated to 7.10.2 and I see libcurl crashing when re-using
the connection. When running the following example:

int main(int argc, char **argv)
  CURL *curl;
  CURLcode res;

  /* this sends all memory debug messages to a specified logfile */

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
    curl_easy_setopt(curl, CURLOPT_HEADER, 1);

    /* get the first document */
    curl_easy_setopt(curl, CURLOPT_URL, "");
    res = curl_easy_perform(curl);

    /* get another document from the same server using the same
       connection */
    curl_easy_setopt(curl, CURLOPT_URL,
    res = curl_easy_perform(curl);

    /* always cleanup */

  return 0;

It gets the first page and then crashes. The crash appears to be in
url.c in the following function:

static void verboseconnect(struct connectdata *conn,
                           struct Curl_dns_entry *dns)

Looks like dns pointer points to NULL.

So, am I doing something wrong or has something changed in Curl or is
this FAQ?


This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
Received on 2003-01-10