From 0fcc460312c5376eb7b2c1deadc633c86eef40ad Mon Sep 17 00:00:00 2001 From: Dale Whittaker Date: Wed, 14 Jul 2010 23:51:39 +0200 Subject: [PATCH] Handle news feeds with empty date and update them correctly --- extensions/feed-panel/feed-parse.c | 7 +++++-- extensions/feed-panel/feed-rss.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/feed-panel/feed-parse.c b/extensions/feed-panel/feed-parse.c index 1f7c41b0..9963d0ec 100644 --- a/extensions/feed-panel/feed-parse.c +++ b/extensions/feed-panel/feed-parse.c @@ -100,8 +100,11 @@ feed_get_element_date (FeedParser* fparser) SoupDate* sdate; sdate = soup_date_new_from_string (content); - date = soup_date_to_time_t (sdate); - soup_date_free (sdate); + if (sdate) + { + date = soup_date_to_time_t (sdate); + soup_date_free (sdate); + } g_free (content); } return ((gint64)date); diff --git a/extensions/feed-panel/feed-rss.c b/extensions/feed-panel/feed-rss.c index 8351fd53..356a582f 100644 --- a/extensions/feed-panel/feed-rss.c +++ b/extensions/feed-panel/feed-rss.c @@ -76,7 +76,7 @@ rss_update (FeedParser* fparser) fparser->node = child; newdate = feed_get_element_date (fparser); fparser->node = node; - return (date != newdate); + return (date != newdate || date == 0); } } child = child->next; -- 2.39.5