Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r2042 - in
      trunk/src/target/OM-2007/applications/openmoko-rssreader: . src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: zecke
Date: 2007-05-19 21:22:29 +0200 (Sat, 19 May 2007)
New Revision: 2042

Modified:
   trunk/src/target/OM-2007/applications/openmoko-rssreader/ChangeLog
   trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
Log:
2007-05-19  Holger Freyther  <[EMAIL PROTECTED]>

        Improve caching. org.openembedded.dev has a patch to libmrss
        0.17.2 to add a new method. Using this method we take over the
        ownership of the buffer of the downloaded file. This avoid all
        errors with mrss_write.
        We are now caching the original file.

        * src/callbacks.c:
        (feed_update_thread):



Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/ChangeLog  
2007-05-19 07:44:20 UTC (rev 2041)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/ChangeLog  
2007-05-19 19:22:29 UTC (rev 2042)
@@ -1,5 +1,16 @@
 2007-05-19  Holger Freyther  <[EMAIL PROTECTED]>
 
+        Improve caching. org.openembedded.dev has a patch to libmrss
+        0.17.2 to add a new method. Using this method we take over the
+        ownership of the buffer of the downloaded file. This avoid all
+        errors with mrss_write.
+        We are now caching the original file.
+
+        * src/callbacks.c:
+        (feed_update_thread):
+
+2007-05-19  Holger Freyther  <[EMAIL PROTECTED]>
+
         Do not crash on non valid pubDates
 
         * src/callbacks.c:

Modified: 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-05-19 07:44:20 UTC (rev 2041)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-05-19 19:22:29 UTC (rev 2042)
@@ -184,7 +184,9 @@
     for ( int i = 0; i < NUMBER_OF_FEEDS; ++i ) {
         mrss_t *rss_data;
         gchar *url = s_feeds[i].url;
-        int ret = mrss_parse_url( url, &rss_data );
+        gchar *buffer = NULL;
+        int  size;
+        int ret = mrss_parse_url_and_transfer_buffer( url, &rss_data, NULL, 
&buffer, &size );
         if ( ret ) {
             /* TODO use the footer to report error? */
             g_debug( "parse_url failed.." );
@@ -199,13 +201,11 @@
         /*
          * now cache the feed, a bit inefficient as we do not write to a file 
directly
          */
-        char *buffer = NULL;
-        mrss_write_buffer (rss_data, &buffer);
         if (buffer) {
-            moko_cache_write_object (data->cache, url, buffer, -1, NULL);
+            moko_cache_write_object (data->cache, url, buffer, size, NULL);
+            free (buffer);
         }
 
-        free (buffer);
         mrss_free( rss_data );
     }
 




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to