Skip to content

Commit

Permalink
json output bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Jul 17, 2019
1 parent bdd066c commit 6c2963b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
8 changes: 5 additions & 3 deletions src/sflowtool.c
Expand Up @@ -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)
Expand Down

0 comments on commit 6c2963b

Please sign in to comment.