aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:43:06 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:43:06 +0400
commit3eee70998acdf203fbab99627cba3fac94f604e0 (patch)
tree154c11cbe03e78d318dde03d6adfce8af1739133 /src/protocol.c
parent028adcf6764fd816ad69a516e7873005ad4bee24 (diff)
downloadrspamd-3eee70998acdf203fbab99627cba3fac94f604e0.tar.gz
rspamd-3eee70998acdf203fbab99627cba3fac94f604e0.zip
Another bad read detected.
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 4e15a47d8..175dbbdbb 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -1195,16 +1195,18 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data
}
}
}
+ if (cd->alive) {
#ifdef HAVE_CLOCK_GETTIME
- cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset,
+ cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset,
cd->log_size - cd->log_offset, "]), len: %z, time: %s, dns req: %d,",
task->msg->len, calculate_check_time (&task->tv, &task->ts,
task->cfg->clock_res), task->dns_requests);
#else
- cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset,
+ cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset,
"]), len: %z, time: %s, dns req: %d,",
task->msg->len, calculate_check_time (&task->tv, task->cfg->clock_res), task->dns_requests);
#endif
+ }
}
static gboolean