[rrd-developers] patch for bug #148
tobi at oetiker.ch
Tue Apr 22 23:42:57 CEST 2008
thanks I have integrated the fix ... the deeper problem here though
is that thepython bindings do not support rrd_info proper which is
not good ... since there are now three important features in
rrdtool that use the rrd_info mechanism for passing data back ...
(rrd_update_v, rrd_graph_v, rrd_info) so if there are any
ablebodied python hackers out there, this might be a good thing to
throw into the mix before 1.3 goes live, which is pretty soon now
Today Matthew Boyle wrote:
> rrd_open() returns either a pointer or NULL, but PyRRD_info() tests the return
> value against -1. if there's a problem opening the file, the error handling
> code is skipped anyway, and it attempts to fclose() an invalid filehandle.
> the fclose() is unnecessary anyway, because any opened files are already
> closed by rrd_open().
> there's also a mismatch between the function definitions for rrd_open in
> src/rrd.h and bindings/python/rrd_extra.h. so rrd_open() gets a bad pointer
> to the rrd_t struct. when this parameter gets initialised, it results in the
> saved %ebp and %eip being overwritten with NULLs. this is obviously a slight
> problem when PyRRD_info() tries to return.
> the attached patch (against svn r1331) should fix both these issues.
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
More information about the rrd-developers