evolution-rss r290 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r290 - in trunk: . src
- Date: Thu, 12 Jun 2008 05:23:01 +0000 (UTC)
Author: lucilanga
Date: Thu Jun 12 05:23:01 2008
New Revision: 290
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=290&view=rev
Log:
2008-06-12 Lucian Langa <lucilanga gnome org>
* prevent fetching enclosure & images
to be canceled by abort_soup_all =>
articles with missing images/enclosures
Modified:
trunk/ChangeLog
trunk/TODO
trunk/src/network-soup.c
trunk/src/rss.c
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Thu Jun 12 05:23:01 2008
@@ -25,7 +25,6 @@
* force soup to follow redirects (304) test on fedora weekly news
* search in the content of page for feed
* obey ttl entity
- * check rename feed when evo 2.24 x86_64
* when adding a feed as opml file offer to import (file detection)
* run-time migration function from text/evolution-rss-feed -> x-evolution/evolution-rss-feed
* test new proxy autehntification
Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c (original)
+++ trunk/src/network-soup.c Thu Jun 12 05:23:01 2008
@@ -401,6 +401,7 @@
net_get_unblocking(const char *url, NetStatusCallback cb,
gpointer data, gpointer cb2,
gpointer cbdata2,
+ guint track,
GError **err)
{
SoupMessage *msg;
@@ -437,9 +438,14 @@
soup_status_get_phrase(2)); //invalid url
return -1;
}
- g_hash_table_insert(rf->session, soup_sess, msg);
- g_hash_table_insert(rf->abort_session, soup_sess, msg);
- g_hash_table_insert(rf->key_session, data, soup_sess);
+ if (track)
+ {
+ //we want to be able to abort this session by calling
+ //abort_all_soup
+ g_hash_table_insert(rf->session, soup_sess, msg);
+ g_hash_table_insert(rf->abort_session, soup_sess, msg);
+ g_hash_table_insert(rf->key_session, data, soup_sess);
+ }
gchar *agstr = g_strdup_printf("Evolution/%s; Evolution-RSS/%s",
EVOLUTION_VERSION_STRING, VERSION);
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Thu Jun 12 05:23:01 2008
@@ -2484,6 +2484,7 @@
key,
(gpointer)finish_feed,
g_strdup(key), // we need to dupe key here
+ 1,
&err); // because we might lose it if
// feed gets deleted
if (err)
@@ -3860,6 +3861,7 @@
#endif
{
FILE *f;
+ g_print("file user_data:%s\n", user_data);
f = fopen(user_data, "wb+");
if (f)
{
@@ -3897,12 +3899,25 @@
return NULL;
name = g_build_filename(tmpdir, g_path_get_basename(url), NULL);
g_free(template);
+ /* test for *loading* images*/
+ gchar *iconfile = g_build_filename (EVOLUTION_ICONDIR,
+ "rss-24.png",
+ NULL);
+/* gchar *buf = g_malloc0(1024);
+ FILE *rf = fopen(iconfile, "rb");
+ fread(buf, 1, 1024, rf);
+ fclose(rf);
+
+ FILE *rw = fopen(name, "wb+");
+ fwrite(buf, 1, 1024, rw);
+ fclose(rw);*/
net_get_unblocking(url,
textcb,
NULL,
(gpointer)finish_image,
name,
+ 0,
&err);
if (err) return NULL;
return name;
@@ -4262,6 +4277,7 @@
NULL,
(gpointer)finish_enclosure,
CF,
+ 0,
&err);
}
else
@@ -4270,7 +4286,7 @@
{
//fputs(feed, fw);
write(fw,feed, strlen(feed));
- fsync(fw);
+// fsync(fw);
}
create_mail(CF);
free_cf(CF);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]