From: Vsevolod Stakhov Date: Thu, 4 Aug 2011 16:46:03 +0000 (+0400) Subject: Another one. X-Git-Tag: 0.4.2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6c4d8488b1322b6e53bc1f0beac94b790b34c5ae;p=rspamd.git Another one. --- diff --git a/src/protocol.c b/src/protocol.c index 175dbbdbb..a037e2b01 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -828,13 +828,15 @@ static gboolean show_metric_symbols_rspamc (struct metric_result *metric_res, struct metric_callback_data *cd) { cd->cur_metric = metric_res->metric; - g_hash_table_foreach (metric_res->symbols, metric_symbols_callback_rspamc, cd); - /* Remove last , from log buf */ - if (cd->log_buf[cd->log_offset - 1] == ',') { - cd->log_buf[--cd->log_offset] = '\0'; - } - if (cd->symbols_buf[cd->symbols_offset - 1] == ',') { - cd->symbols_buf[--cd->symbols_offset] = '\0'; + if (cd->alive) { + g_hash_table_foreach (metric_res->symbols, metric_symbols_callback_rspamc, cd); + /* Remove last , from log buf */ + if (cd->log_buf[cd->log_offset - 1] == ',') { + cd->log_buf[--cd->log_offset] = '\0'; + } + if (cd->symbols_buf[cd->symbols_offset - 1] == ',') { + cd->symbols_buf[--cd->symbols_offset] = '\0'; + } } return TRUE;