aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-01 05:06:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-01 05:06:44 +0800
commit65839ea1ee663580ccea1116b13e176b72cf632b (patch)
tree5eb5366f793ce3cbdb329c9f531005d568b7f790
parent25152d9caa8edfcd4c8a9de0eda999cc81f7b89e (diff)
downloadgsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.gz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.bz2
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.lz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.xz
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.tar.zst
gsoc2013-evolution-65839ea1ee663580ccea1116b13e176b72cf632b.zip
A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01
2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. * camel-filter-driver.c (camel_filter_driver_filter_folder): Check to make sure message isn't NULL. svn path=/trunk/; revision=8431
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-filter-driver.c2
-rw-r--r--camel/camel-mime-utils.c10
3 files changed, 16 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 444d3b8ea3..82cf3b7d6d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-mime-utils.c (header_decode_date): A fix for broken
+ mailers that send 2-digit years (ie "Wed, 28 Feb 01
+ 04:59:41"). Fixes bug #1633.
+
+ * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
+ to make sure message isn't NULL.
+
2001-02-28 Dan Winship <danw@ximian.com>
* camel-remote-store.c (remote_recv_line): If we get back 0 bytes
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 08d2b06265..20c93d3d61 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -700,7 +700,7 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde
uids->len);
message = camel_folder_get_message (folder, uids->pdata[i], ex);
- if (camel_exception_is_set (ex)) {
+ if (!message || camel_exception_is_set (ex)) {
report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed at message %d of %d",
i+1, uids->len);
break;
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 49dce438e1..18bf4cb8d3 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2655,10 +2655,10 @@ header_decode_date(const char *in, int *saveoffset)
char *newdate;
w(g_warning("day not followed by ',' it's probably a broken mail client, so we'll ignore its date entirely"));
- printf ("Giving it one last chance...\n");
+ w(printf ("Giving it one last chance...\n"));
newdate = parse_broken_date (in);
if (newdate) {
- printf ("Got: %s\n", newdate);
+ w(printf ("Got: %s\n", newdate));
t = header_decode_date (newdate, saveoffset);
g_free (newdate);
return t;
@@ -2682,10 +2682,12 @@ header_decode_date(const char *in, int *saveoffset)
g_free(monthname);
}
year = header_decode_int(&inptr);
- if (year<100) {
+ if (year < 69) {
+ tm.tm_year = 100 + year;
+ } else if (year < 100) {
tm.tm_year = year;
} else {
- tm.tm_year = year-1900;
+ tm.tm_year = year - 1900;
}
/* get the time ... yurck */
tm.tm_hour = header_decode_int(&inptr);