From 6c4d8488b1322b6e53bc1f0beac94b790b34c5ae Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 4 Aug 2011 20:46:03 +0400 Subject: [PATCH] Another one. --- src/protocol.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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; -- 2.39.5