]> source.dussan.org Git - rspamd.git/commitdiff
Fix to json output.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 18 Aug 2011 13:44:12 +0000 (17:44 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 18 Aug 2011 13:44:12 +0000 (17:44 +0400)
src/protocol.c

index df7ef4f9c6b6c748eacce680ed0a660c283604c5..811fb2c4c7fae9f3caa6e5d44abae3bbfc1b7bf1 100644 (file)
@@ -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 "        ");