[rrd-users] width/height return values with lazy.
Tobias Oetiker
tobi at oetiker.ch
Sun Jun 29 15:59:53 CEST 2008
Hi Raimund,
the fix in r1439 ...
this is the minimal patch ...
--- src/rrd_graph.c (revision 1438)
+++ src/rrd_graph.c (working copy)
@@ -2951,8 +2951,13 @@
PangoFontMap *font_map = pango_cairo_font_map_get_default();
/* if we are lazy and there is nothing to PRINT ... quit now */
- if (lazy && im->prt_c == 0)
+ if (lazy && im->prt_c == 0) {
+ info.u_cnt = im->ximg;
+ grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
+ info.u_cnt = im->yimg;
+ grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
return 0;
+ }
/* pull the data from the rrd files ... */
if (data_fetch(im) == -1)
return -1;
cheers
tobi
Yesterday Raimund Berger wrote:
>
> Hey
>
> sorry for jumping in again, but I noticed a change which gives me some
> trouble with a couple of scripts scripts right now.
>
> Specifically, rrdgraph seems to not anymore return image width and
> height with lazy option and when the image is up to date. Looks like
> this behavior changed somewhere on the way from 1.2 to 1.3 .
>
> I guess in Perl, I could also use graphv and take the return hash
> apart. But I'd still like to know whether this is a slipup or
> intent. Any light shed highly appreciated.
>
> Thanks,
> R.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list