]> source.dussan.org Git - rspamd.git/commitdiff
Another one.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 4 Aug 2011 16:46:03 +0000 (20:46 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 4 Aug 2011 16:46:03 +0000 (20:46 +0400)
src/protocol.c

index 175dbbdbb02750a565440197132f53c6223d9dd2..a037e2b01db578c104a07326bb3075ca5452c91f 100644 (file)
@@ -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;