aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-21 14:06:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-21 14:06:37 +0000
commitd73a3db2211150ec12bd3c91e7e78b74b6ad19a0 (patch)
tree9042ad551b32a8c138e1d2d2232e5613b074a9b3
parentbe6fe2527a6f5e6b9ebe2f124bdcb2749d9f7997 (diff)
downloadrspamd-d73a3db2211150ec12bd3c91e7e78b74b6ad19a0.tar.gz
rspamd-d73a3db2211150ec12bd3c91e7e78b74b6ad19a0.zip
[Minor] Avoid gmime in parsing time
-rw-r--r--src/ragel/smtp_received_parser.rl9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ragel/smtp_received_parser.rl b/src/ragel/smtp_received_parser.rl
index cc4d37e0c..12b1c1b5c 100644
--- a/src/ragel/smtp_received_parser.rl
+++ b/src/ragel/smtp_received_parser.rl
@@ -254,14 +254,7 @@
}
action Date_End {
if (date_start && p > date_start) {
- guint len;
- char *tdate;
-
- len = p - date_start;
- tdate = g_malloc (len + 1);
- rspamd_strlcpy (tdate, date_start, len + 1);
- rh->timestamp = g_mime_utils_header_decode_date (tdate, NULL);
- g_free (tdate);
+ rh->timestamp = rspamd_tm_to_time (&tm, tz);
}
}