cURL / Mailing Lists / curl-library / Single Mail


curl_easy_send() failure on some linux machines

From: Yuichi Kuroda <>
Date: Thu, 29 Oct 2009 06:23:40 +0900

I have a problem connecting to a host from some Linux distros while I can connect to it via other Linux distros.My code is something like this.
        curl_easy_init(); curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1); curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); curl_easy_setopt(curl, CURLOPT_URL, sIP.c_str()); curl_easy_setopt(curl, CURLOPT_PORT, lPort); curl_easy_setopt(curl, CURLOPT_LOCALPORT, lPort); res = curl_easy_perform(curl);
The error message I get from this is 'Couldn't connect to host'. Even through a simple command line like 'curl'would give me a connection refused error. Plus it works on some Linux distros, while it doesn't on others.Currently in my testing, it works for Fedora 8 & 11 and Ubuntu 8 & 9 while it doesn't work on SuSE 10.1 and Fedora 5.
Why is it not working (seemingly) on older Linux distros? Are there some extra options I should set?
Thanks for any help in advance.
Windows Live Hotmail: Your friends can get your Facebook updates, right from HotmailŪ.

List admin:
Received on 2009-10-28