evolution-rss r211 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r211 - in trunk: . src
- Date: Fri, 7 Mar 2008 15:45:37 +0000 (GMT)
Author: lucilanga
Date: Fri Mar 7 15:45:36 2008
New Revision: 211
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=211&view=rev
Log:
sanatize_file_to_message
Modified:
trunk/ChangeLog
trunk/src/rss.c
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Fri Mar 7 15:45:36 2008
@@ -3210,8 +3210,11 @@
camel_multipart_add_part(mp, part);
camel_object_unref(part);
CamelMimePart *msgp = file_to_message(CF->encl);
- camel_multipart_add_part(mp, msgp);
- camel_object_unref(msgp);
+ if (msgp)
+ {
+ camel_multipart_add_part(mp, msgp);
+ camel_object_unref(msgp);
+ }
camel_medium_set_content_object((CamelMedium *)new, (CamelDataWrapper *)mp);
camel_object_unref(mp);
}
@@ -3674,7 +3677,11 @@
camel_mime_part_set_encoding(msg, CAMEL_TRANSFER_ENCODING_BINARY);
CamelDataWrapper *content = camel_data_wrapper_new();
- file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_RDONLY, 0);
+ //file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_RDONLY, 0);
+ file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_RDWR|O_CREAT, 0666);
+
+ if (!file)
+ return NULL;
camel_data_wrapper_construct_from_stream(content, (CamelStream *)file);
camel_object_unref((CamelObject *)file);
@@ -3931,17 +3938,17 @@
}
}
//try the source construct
- xmlNodePtr source;
- source = layer_find_pos(el->children, "source", "author");
+// xmlNodePtr source;
+// source = layer_find_pos(el->children, "source", "author");
// source = layer_find_pos(el->children, "source", "contributor");
- if (source != NULL)
- if (source->children != NULL)
- {
- char *aut=NULL;
+// if (source != NULL)
+// if (source->children != NULL)
+// {
+// char *aut=NULL;
//auth = g_strdup(layer_find_innerhtml(source->children, "author", "name", NULL));
- if (aut)
- g_print("AUT:%s\n", aut);
- }
+// if (aut)
+// g_print("AUT:%s\n", aut);
+// }
else //then RSS or RDF
{
q = g_strdup(layer_find (el->children, "author",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]