cURL / Mailing Lists / curl-library / Single Mail

curl-library

App dies at curl_easy_perform (possibly related to connect.c)

From: M D <divertnet_at_yahoo.com>
Date: Tue, 23 Nov 2010 21:13:51 -0800 (PST)

I'm using curl 7.2.1, zlib 1.2.5, and openssl 0.9.8o for this app.
VERBOSE output merely gives a message similar to the following:

* About to connect() to secured.example.com port 443 (#0)
* Trying xxx.xxx.xxx.xxx... * connected
* Connected to secured.example.com (xxx.xxx.xxx.xxx) port 443 (#0)

Here are snippets of the relevant code:

string strURL;
CURLcode res;
char* s;
struct curl_slist *headerlist=NULL;
static const char buf[] = "Expect:";
CURL *curl;
.
.
.
curl = curl_easy_init();
headerlist = curl_slist_append(headerlist, buf);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, s);
curl_easy_setopt(curl, CURLOPT_URL, strURL.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, s);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
res = curl_easy_perform(curl);

Debugger seems to be pointing to line 461 of connect.c

/*
 * verifyconnect() returns TRUE if the connect really has happened.
 */
static bool verifyconnect(curl_socket_t sockfd, int *error)
.
.
.
  if(0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))

Are there any typical problems that would cause a problem like this? Alternatively, any tips on pinpointing what I'm doing wrong?

Thanks

      
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-24