json output: bugfix: correct range specify only first ip

Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Gilles Bouthenot <gilles.bouthenot@univ-fcomte.fr>
This commit is contained in:
Gilles Bouthenot 2012-12-05 12:54:49 +01:00 committed by Sami Kerola
parent e9d196e816
commit bc654bcc68

View file

@ -384,8 +384,10 @@ int output_json(void)
fprintf(outfile, "\"location\":\"\", "); fprintf(outfile, "\"location\":\"\", ");
} }
fprintf(outfile, "\"range\":\"%s\", ", fprintf(outfile, "\"range\":\"%s",
ntop_ipaddr(&range_p->first_ip)); ntop_ipaddr(&range_p->first_ip));
fprintf(outfile, " - %s\", ",
ntop_ipaddr(&range_p->last_ip));
fprintf(outfile, "\"defined\":%lu, ", range_size); fprintf(outfile, "\"defined\":%lu, ", range_size);
fprintf(outfile, "\"used\":%lu, ", range_p->count); fprintf(outfile, "\"used\":%lu, ", range_p->count);
fprintf(outfile, "\"free\":%lu ", fprintf(outfile, "\"free\":%lu ",