From f1dfa5ad6cd80322de76b1bb4bf58740fe2d2698 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Sun, 24 Nov 2013 16:42:53 +0100 Subject: [PATCH] inf is null in json :-( --- src/rrd_xport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 4ecee042..22efe735 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -769,7 +769,7 @@ int rrd_xport_format_xmljson(int flags,stringbuffer_t *buffer,image_desc_t *im,t rrd_value_t newval = DNAN; newval = *ptr; if (json){ - if (isnan(newval)){ + if (isnan(newval) || isinf(newval)){ addToBuffer(buffer,"null",0); } else { snprintf(buf,sizeof(buf),"%0.10e",newval); -- 2.47.3