]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix #463 - account for step in xport json 464/head
authorAlexander Else <aelse@else.id.au>
Tue, 6 May 2014 07:22:50 +0000 (17:22 +1000)
committerAlexander Else <aelse@else.id.au>
Tue, 6 May 2014 07:22:50 +0000 (17:22 +1000)
Final element check changed from end to end-step

src/rrd_xport.c

index 57ed991fa7ead2d019fb37b0782a8138f6ea05bb..57d5f47de200d8cdd76296525f646590b18c71c9 100644 (file)
@@ -797,7 +797,7 @@ int rrd_xport_format_xmljson(int flags,stringbuffer_t *buffer,image_desc_t *im,t
       ptr++;
     }                
     if (json){
-      addToBuffer(buffer,(ti < end ? " ],\n" : " ]\n"),0);
+      addToBuffer(buffer,(ti < end-step ? " ],\n" : " ]\n"),0);
     }
     else {                
       snprintf(buf,sizeof(buf),"</%s>\n", DATA_ROW_TAG);