Re: [rrd-users] [PATCH] invalid times when calling fetch with ruby

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 ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-08-2007
Tobias Oetiker
 
Posts: n/a
Default Re: [rrd-users] [PATCH] invalid times when calling fetch with ruby

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0