]> source.dussan.org Git - rspamd.git/commitdiff
Do not add extra useless line for restfull output.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Jun 2013 13:55:01 +0000 (14:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Jun 2013 13:55:01 +0000 (14:55 +0100)
src/controller.c

index 865f8f1de77f4c6fcf59c63663c4883fe1b0afeb..45c0264255b9964b2e3b56caf76f3fde9889a0c6 100644 (file)
@@ -433,7 +433,12 @@ process_counters_command (struct controller_session *session)
 
        cache = session->cfg->cache;
 
-       r = rspamd_snprintf (out_buf, sizeof (out_buf), "Rspamd counters." CRLF);
+       if (!session->restful) {
+               r = rspamd_snprintf (out_buf, sizeof (out_buf), "Rspamd counters." CRLF);
+       }
+       else {
+               r = 0;
+       }
 
        if (cache != NULL) {
                cur = cache->negative_items;