Changeset 1871


Ignore:
Timestamp:
04/29/07 18:43:19 (6 years ago)
Author:
zecke
Message:

2007-04-29 Holger Hans Peter Freyther <zecke@…>

  • src/rfcdate.c: Handle wrong dates (rss_rfc_date_set): If we can't parse set it to 26.01.1983 (rss_rfc_date_compare): Check if the dates we pass to g_date_compae

are valid

Location:
trunk/src/target/OM-2007/applications/openmoko-rssreader
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/applications/openmoko-rssreader/ChangeLog

    r1869 r1871  
     12007-04-29  Holger Hans Peter Freyther  <zecke@selfish.org> 
     2 
     3        * src/rfcdate.c: Handle wrong dates 
     4        (rss_rfc_date_set): If we can't parse set it to 26.01.1983 
     5        (rss_rfc_date_compare): Check if the dates we pass to g_date_compae 
     6are valid 
     7 
    182007-04-29  Holger Hans Peter Freyther  <zecke@selfish.org> 
    29 
  • trunk/src/target/OM-2007/applications/openmoko-rssreader/src/rfcdate.c

    r1867 r1871  
    195195     */ 
    196196    if ( !g_date_valid (self->date) ) { 
     197        g_date_set_dmy (self->date, 26, G_DATE_JANUARY, 1983 ); 
    197198        g_print ("Setting RFC Date failed: '%s' %d %d %s %d  %ld\n", 
    198199                        rfc822date, 
     
    208209 * Start by comparing the dates and only if they are equal compare 
    209210 * the times. 
     211 * For invalid dates we need a special treatment 
    210212 */ 
    211213gint 
    212214rss_rfc_date_compare (RSSRFCDate *left, RSSRFCDate *right) 
    213215{ 
     216    g_assert ( g_date_valid (left->date) ); 
     217    g_assert ( g_date_valid (right->date) ); 
     218 
    214219    int date_result = g_date_compare( left->date, right->date ); 
    215220    if (  date_result != 0 ) 
Note: See TracChangeset for help on using the changeset viewer.