diff --git a/configure.ac b/configure.ac index 11fb922..f9140f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([sflowtool],[5.03]) +AC_INIT([sflowtool],[5.04]) AC_CONFIG_SRCDIR([src/sflowtool.c]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) diff --git a/sflowtool.spec b/sflowtool.spec index 0237c89..c33942f 100644 --- a/sflowtool.spec +++ b/sflowtool.spec @@ -1,6 +1,6 @@ Summary: tool to ascii-print or forward sFlow datagrams Name: sflowtool -Version: 5.03 +Version: 5.04 Release: 1%{?dist} License: https://www.inmon.com/technology/sflowlicense.txt Group: Productivity/Networking/Diagnostic diff --git a/src/sflowtool.c b/src/sflowtool.c index 5f7cb32..e2d9da8 100644 --- a/src/sflowtool.c +++ b/src/sflowtool.c @@ -946,9 +946,11 @@ static void json_indent() { } static void json_start(char *fname, char bracket) { - if(sfConfig.jsonStart == NO) { - if(sfConfig.jsonListStart == NO) - putchar(','); + if(sfConfig.jsonStart) { + sfConfig.jsonStart = NO; + } + else if(sfConfig.jsonListStart == NO) { + putchar(','); json_indent(); } if(fname)