summaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-18 17:51:23 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-18 17:51:23 +0400
commit46ee81d4252f76055836c176edc89dd2914f7fb3 (patch)
tree2cf0e16ad5980a1eb2f10ed6df049b2bd7764be7 /src/protocol.c
parentd6317cec73e061d038271a53fcb2176ffcdda938 (diff)
downloadrspamd-46ee81d4252f76055836c176edc89dd2914f7fb3.tar.gz
rspamd-46ee81d4252f76055836c176edc89dd2914f7fb3.zip
Json fix.
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 811fb2c4c..a6da0640c 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -873,11 +873,11 @@ metric_symbols_callback_json (gpointer key, gpointer value, void *user_data)
(gchar *)key, s->score);
if (description != NULL) {
cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset,
- " \"description\": \"%s\"" CRLF, description);
+ " \"description\": \"%s\"%s" CRLF, description, s->options ? "" : ",");
}
else {
cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset,
- " \"description\": \"\"" CRLF);
+ " \"description\": \"\"%s" CRLF, s->options ? "" : ",");
}
if (s->options) {
cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset,