aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libserver/protocol.c4
-rw-r--r--src/libserver/rspamd_symcache.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 3574b94d2..72526ecee 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -1475,7 +1475,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task)
struct rspamd_metric_result *mres;
struct rspamd_symbol_result *sym;
gint id, i;
- guint32 *sid, n = 0, nextra = 0;
+ guint32 sid, n = 0, nextra = 0;
gsize sz;
GArray *extra;
struct rspamd_protocol_log_symbol_result er;
@@ -1627,7 +1627,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task)
sid = task->settings_id;
if (sid) {
- ls->settings_id = *sid;
+ ls->settings_id = sid;
}
else {
ls->settings_id = 0;
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 1d285dc6f..bc3b5295c 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -2684,7 +2684,6 @@ rspamd_symcache_finalize_item (struct rspamd_task *task,
struct rspamd_symcache_dynamic_item *dyn_item;
gdouble t2, diff;
guint i;
- struct timeval tv;
const gdouble slow_diff_limit = 300;
/* Sanity checks */
@@ -2713,6 +2712,7 @@ rspamd_symcache_finalize_item (struct rspamd_task *task,
checkpoint->cur_item = NULL;
#ifdef HAVE_EVENT_NO_CACHE_TIME_FUNC
+ struct timeval tv;
event_base_update_cache_time (task->ev_base);
event_base_gettimeofday_cached (task->ev_base, &tv);
t2 = tv_to_double (&tv);