Author: akv
Date: 2010-12-30 03:23:56 +0100 (Thu, 30 Dec 2010)
New Revision: 3740
Modified:
trunk/librawstudio/rs-lens-db-editor.c
Log:
Adding error output when fetching files with curl.
Modified: trunk/librawstudio/rs-lens-db-editor.c
===================================================================
--- trunk/librawstudio/rs-lens-db-editor.c 2010-12-30 02:16:01 UTC (rev
3739)
+++ trunk/librawstudio/rs-lens-db-editor.c 2010-12-30 02:23:56 UTC (rev
3740)
@@ -659,6 +659,11 @@
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, xml);
result = curl_easy_perform(curl);
+ if (result != 0)
+ {
+ g_debug("Could not fetch list of files from %s.", baseurl);
+ return FALSE;
+ }
htmlDocPtr doc = htmlReadMemory(xml->str, xml->len, NULL, NULL, 0);
htmlNodePtr cur, child;
@@ -696,6 +701,12 @@
cur = cur->next;
cur = cur->next;
+
+ if (result != 0)
+ {
+ g_debug("Could not fetch file from %s or write it to
%s.", url, file);
+ return FALSE;
+ }
}
const gchar *datadir = g_build_filename(g_get_user_data_dir(),
"lensfun", NULL);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit