From d6317cec73e061d038271a53fcb2176ffcdda938 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 18 Aug 2011 17:44:12 +0400 Subject: [PATCH] Fix to json output. --- src/protocol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol.c b/src/protocol.c index df7ef4f9c..811fb2c4c 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -875,6 +875,10 @@ metric_symbols_callback_json (gpointer key, gpointer value, void *user_data) cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset, " \"description\": \"%s\"" CRLF, description); } + else { + cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset, + " \"description\": \"\"" CRLF); + } if (s->options) { cd->symbols_offset += rspamd_snprintf (cd->symbols_buf + cd->symbols_offset, cd->symbols_size - cd->symbols_offset, " \"options\": [" CRLF " "); -- 2.39.5