[rrd-users] Re: rrdcgi bug ?
steve rader
rader at teak.wiscnet.net
Wed Nov 3 04:15:35 MET 1999
> *> using <RRD::PRINT 1> seems to fail. See posts of Steve Rader and me
> *> on rrd-users.
> *>
> *> Steve, are you able to confirm the version?
'tis 1.0.7
> From: Tobias Oetiker
> I think I found the problem ...
>
> drawprint should look like this
>
> char* drawprint(long argc, char **args){
> if (argc==1 && calcpr){
> long i=0;
> while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/
> if (atol(args[0])<i-1)
> return stralloc(calcpr[atol(args[0])+1]);
> }
> return stralloc("[ERROR: RRD::PRINT argument error]");
> }
>
> note the first return ...
You're on the right track! Imagine that. =:) I found that
the following patch makes <RRD::PRINT 1> work for me:
--- rrd_cgi.c.orig Fri Aug 27 14:20:05 1999
+++ rrd_cgi.c Tue Nov 2 21:09:52 1999
@@ -332,7 +332,7 @@
}
char* drawprint(long argc, char **args){
- if (argc>=1 && calcpr != NULL){
+ if (argc==1 && calcpr != NULL){
long i=0;
while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/
if (atol(args[0])<i-1)
> let me know if this helps ...
oh, yea
steve
- - -
systems guy
wiscnet.net
--
* To unsubscribe from the rrd-users mailing list, send a message with the
subject: unsubscribe to rrd-users-request at list.ee.ethz.ch
More information about the rrd-users
mailing list