This is a discussion on Re: [rrd-users] [PATCH] invalid times when calling fetch with ruby within the RRD Users forums, part of the Networking and Network Related category; Mike, thanks ... I have included the fix in 1.2 and trunk and added the feature to trunk. cheers tobi ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Mike,
thanks ... I have included the fix in 1.2 and trunk and added the feature to trunk. cheers tobi Yesterday Mike Perham wrote: > Index: main.c > ================================================== ================= > --- main.c (revision 8873) > +++ main.c (working copy) > @@ -129,11 +130,12 @@ > } > free(raw_data); > > - result = rb_ary_new2(4); > - rb_ary_store(result, 0, INT2FIX(start)); > - rb_ary_store(result, 1, INT2FIX(end)); > + result = rb_ary_new2(5); > + rb_ary_store(result, 0, INT2NUM(start)); > + rb_ary_store(result, 1, INT2NUM(end)); > rb_ary_store(result, 2, names); > rb_ary_store(result, 3, data); > + rb_ary_store(result, 4, INT2FIX(step)); > > The solution to the corruption is to use the INT2NUM macro, not > INT2FIX. The latter can lose data on large integers. > > Please note the diff above also adds the step value to the returned > results. This would be a very useful addition to the API for us. > > _______________________________________________ > rrd-users mailing list > rrd-users@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten http://it.oetiker.ch tobi@oetiker.ch ++41 62 213 9902 _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
![]() |
| Thread Tools | |
| Display Modes | |
|
|