Check-in [72ebaa6d61]

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

Overview
Comment:Print the actual error message when failing
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 72ebaa6d612a15ab79bec16a19041f016f8912b3
User & Date: bapt 2014-06-16 15:05:16
Context
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
14:49
Finish all help output check-in: 527018c138 user: bapt tags: trunk
Changes

Changes to cplanet.c.

455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
	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", url);
		free(feed.xmlpath->data);
		free(feed.xmlpath);
		return (0);
	}

	if ((parser = XML_ParserCreate(NULL)) == NULL)
		errx(1, "Unable to initialise expat");







|







455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
	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);
		free(feed.xmlpath);
		return (0);
	}

	if ((parser = XML_ParserCreate(NULL)) == NULL)
		errx(1, "Unable to initialise expat");