]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid gmime in parsing time
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Dec 2016 14:06:37 +0000 (14:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Dec 2016 14:06:37 +0000 (14:06 +0000)
src/ragel/smtp_received_parser.rl

index cc4d37e0c3ae7157aca2abc6ef26afc34970d3b3..12b1c1b5cc5b5e39cbf876bc5b01474ed0cd4e2e 100644 (file)
   }
   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);
     }
   }