Check-in [8f1dcd5982]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Set a default timeout
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8f1dcd598291f1fb6d07763e371ddc0b0b5dc458
User & Date: bapt 2014-06-16 23:07:44
Context
2015-01-19
10:38
Increase timeout on connections, allow self signed https Leaf check-in: aeafbabd54 user: bapt tags: trunk
2014-06-16
23:07
Set a default timeout check-in: 8f1dcd5982 user: bapt tags: trunk
15:05
Print the actual error message when failing check-in: 72ebaa6d61 user: bapt tags: trunk
Changes

Changes to cplanet.c.

450
451
452
453
454
455
456

457
458
459
460
461
462
463
	curl_easy_setopt(curl, CURLOPT_HEADER, 0);
	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
	curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_to_buffer);
	curl_easy_setopt(curl, CURLOPT_WRITEDATA, rawfeed);
	curl_easy_setopt(curl, CURLOPT_USERAGENT, "cplanet/"CPLANET_VERSION);
	curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");


	res = curl_easy_perform(curl);

	if (res != CURLE_OK || utstring_len(rawfeed) == 0) {
		curl_easy_cleanup(curl);
		warnx("An error occured while fetching %s: %s", url, curl_easy_strerror(res));
		free(feed.xmlpath->data);







>







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
	curl_easy_setopt(curl, CURLOPT_HEADER, 0);
	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
	curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_to_buffer);
	curl_easy_setopt(curl, CURLOPT_WRITEDATA, rawfeed);
	curl_easy_setopt(curl, CURLOPT_USERAGENT, "cplanet/"CPLANET_VERSION);
	curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");
	curl_easy_setopt(curl, CURLOPT_TIMEOUT, 400);

	res = curl_easy_perform(curl);

	if (res != CURLE_OK || utstring_len(rawfeed) == 0) {
		curl_easy_cleanup(curl);
		warnx("An error occured while fetching %s: %s", url, curl_easy_strerror(res));
		free(feed.xmlpath->data);