]> source.dussan.org Git - rspamd.git/commitdiff
* While printing symbols list on log strip last ',' from logline
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 19 Mar 2009 09:29:57 +0000 (12:29 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 19 Mar 2009 09:29:57 +0000 (12:29 +0300)
src/protocol.c

index f65d0b1a5a270ec39506a9b0b8dbded3d5bdd0aa..706040bc694a9865bffdfbb9c8cd437fe9e90722 100644 (file)
@@ -430,6 +430,10 @@ show_metric_symbols (struct metric_result *metric_res, struct metric_callback_da
        }
        else {
                g_hash_table_foreach (metric_res->symbols, metric_symbols_callback, cd);
+               /* Remove last , from log buf */
+               if (cd->log_buf[cd->log_offset - 1] == ',') {
+                       cd->log_buf[--cd->log_offset] = '\0';
+               }
        }
 }