[rrd-users] width/height return values with lazy.

Raimund Berger raimund.berger at gmail.com
Sun Jun 29 19:32:48 CEST 2008


Tobias Oetiker <tobi at oetiker.ch> writes:

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

Much obliged, many thanks for the helpful response, R.



More information about the rrd-users mailing list