diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-13 17:46:50 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-13 17:46:50 +0100 |
commit | d2a938d398d31fae55e709a4e219b5acfa5c7622 (patch) | |
tree | 616ee4dacde622e13ee26f4437febf9e5eae4661 /src/libutil | |
parent | 444c70ff896dcd07f1569e394b528cf1f61dec54 (diff) | |
download | rspamd-d2a938d398d31fae55e709a4e219b5acfa5c7622.tar.gz rspamd-d2a938d398d31fae55e709a4e219b5acfa5c7622.zip |
Rework parts and task structure:
- Now text_parts, parts and received are arrays
- Pre-allocate arrays with some reasonable defaults
- Use arrays instead of lists in plugins and checks
- Remove unused fields from task structure
- Rework mime_foreach callback function
- Remove deprecated scan_milliseconds field
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.c | 5 | ||||
-rw-r--r-- | src/libutil/util.h | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 8be3fc597..bc58fc70a 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1191,8 +1191,7 @@ resolve_stat_filename (rspamd_mempool_t * pool, } const gchar * -calculate_check_time (gdouble start_real, gdouble start_virtual, gint resolution, - guint32 *scan_time) +rspamd_log_check_time (gdouble start_real, gdouble start_virtual, gint resolution) { double vdiff, diff, end_real, end_virtual; static gchar res[64]; @@ -1203,8 +1202,6 @@ calculate_check_time (gdouble start_real, gdouble start_virtual, gint resolution vdiff = (end_virtual - start_virtual) * 1000; diff = (end_real - start_real) * 1000; - *scan_time = diff; - sprintf (fmt, "%%.%dfms real, %%.%dfms virtual", resolution, resolution); snprintf (res, sizeof (res), fmt, diff, vdiff); diff --git a/src/libutil/util.h b/src/libutil/util.h index abc949dfc..d3dcdbcf7 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -158,8 +158,7 @@ gchar * resolve_stat_filename (rspamd_mempool_t *pool, gchar *from); const gchar * -calculate_check_time (gdouble start_real, gdouble start_virtual, gint resolution, - guint32 *scan_time); +rspamd_log_check_time (gdouble start_real, gdouble start_virtual, gint resolution); /* * File locking functions |