[rrd-developers] Bug#251701: fix #182217 breaks librrdp-perl
sh at tokkee.org
Tue Apr 7 23:05:02 CEST 2009
On Tue, Apr 07, 2009 at 10:34:08PM +0200, Tobias Oetiker wrote:
> Today Sebastian Harl wrote:
> > On Tue, Apr 07, 2009 at 07:25:47PM +0200, Tobias Oetiker wrote:
> > > adding a newline after the graph output is quite simple, and I
> > > imagine it would not immediately break anything ...
> > Hrm ... I'm not sure if this is a good idea. I don't know if some binary
> > graphics format might cause problems, if "arbitrary" bytes are appended.
> > PNG does not seem to care (judging from a quick test) but I wouldn't
> > implement something like that without being sure about that.
> PNG is the most binary data format supported by rrdtool, so this is
> no problem
Well, I did not look at any PNG specs, so I'm not sure if imagemagick
just happens to handle that sanely. Also, I, personally, don't like
adding stuff that might cause trouble in the future (e.g. if support for
some other binary data format is added at some point). YMMV though ;-)
> and what's more, the \n is only 'appended' in piping mode.
Sure ... that might be used to pipe the image to some other tools though
and eventually write the final output to disk.
> do you see another solution ?
Removing RRDp altogether ... *scnr* ;-)
Frankly, as I said before, I'm really unsure how to solve that properly.
Please don't get me wrong - I'm just trying to avoid trouble in the
future by pointing out possible problems ...
> > > the RRDp code will NOT work when there is a newline inside the graph
> > > but this has always been the case ...
> > ... a newline followed by the string "OK" ... </nitpick> ;-)
> look at the RRDp code, I don't think it looks for \nOK it is happy
> with \n
RRDp::read() loops until it finds a line starting with either 'ERROR' or
'OK'. In fact, a PNG includes lots of newline characters, so this would
not work at all otherwise.
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20090407/8d58fe11/attachment.bin
More information about the rrd-developers