evolution-rss r371 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r371 - in trunk: . src
- Date: Sun, 7 Sep 2008 11:34:25 +0000 (UTC)
Author: lucilanga
Date: Sun Sep 7 11:34:24 2008
New Revision: 371
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=371&view=rev
Log:
2008-09-07 Lucian Langa <lucilanga gnome org>
* src/rss.c: feed_is_new()
fix for #550744 - prevent duplicate
feeds
* src/misc.c: get_server_from_uri()
sanitize input
* src/rss.c: org_gnome_cooly_format_rss
santize exit from corrupt article format
(fix for #551193)
Modified:
trunk/ChangeLog
trunk/src/misc.c
trunk/src/rss.c
Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c (original)
+++ trunk/src/misc.c Sun Sep 7 11:34:24 2008
@@ -114,15 +114,27 @@
else
return url;
}
-
+
+gchar *
+get_server_port(gchar *url)
+{
+ if (strstr(url, ":") == NULL)
+ return NULL;
+
+ gchar **str = g_strsplit(url, ":", 2);
+ return str[2];
+}
+
gchar *
get_server_from_uri(gchar *uri)
{
g_return_val_if_fail( uri != NULL, NULL);
+ if (strstr(uri, "://") == NULL)
+ return NULL;
gchar **str = g_strsplit(uri, "://", 2);
- gchar **str2 = g_strsplit(str[1], "/", 2);
- gchar *server = g_strdup_printf("%s://%s", str[0], str2[0]);
+ gchar **str2 = g_strsplit(str[1], "/", 2);
+ gchar *server = g_strdup_printf("%s://%s", str[0], str2[0]);
g_strfreev(str);
g_strfreev(str2);
return server;
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Sun Sep 7 11:34:24 2008
@@ -1824,7 +1824,6 @@
guint32 content_colour = emfh->content_colour ? emfh->content_colour: 0xffffff;
guint32 text_colour = emfh->text_colour ? emfh->text_colour: 0xffffff;
-/// camel_folder_append_message (new_folder, message, info, NULL, ex);
type = camel_mime_part_get_content_type(message);
const char *website = camel_medium_get_header (CAMEL_MEDIUM (message), "Website");
if (!website)
@@ -4245,6 +4244,9 @@
memset(rfeed, 0, 512);
FILE *fr = fopen(file_name, "r");
int occ = 0;
+ //in case URI part contains this
+ gchar *tmpneedle = strextr(needle, ":80");
+
if (fr)
{
while (fgets(rfeed, 511, fr) != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]